\  FORTH Assembler for Super8                hfs 21:00 08.04.91                                                                 Autor:          Heinz Schnitter (hfs)                                           Nelkenstr. 52                                              8044 Unterschleiáheim                                                                                                Information:                                                                                                                     - Includes local labels ( n$: and n$ )                          - Use FORTH-Heap:    | , HIDE and REVEAL                                                                                          For other FORTH-Versions use redefinition : | ; and exchange    HIDE ( hide last word ) and REVEAL ( allowing last word ) .                                                                                                                                                                                                  \ LOADSCREEN                                 hfs 11:19 24.03.91                                                                  HEX                                                                                                                             VOCABULARY ASSEMBLER  ASSEMBLER DEFINITIONS                                                                                     HERE                   ( Begin )                                                                                                DECIMAL 02 32 THRU     ( Variable, RESET )                                                                                      DECIMAL HERE  FORTH  SWAP -                                                                                                     CR .( Length of Assembler: ) U. .( Bytes ) CR                                                                                                                                                                                                                  \ VARIABLEs and RESET                        hfs 19:05 10.01.90 HEX                                                                   | VARIABLE  SSP   \ save of SP                                  | VARIABLE <$>    \ local labels                                | VARIABLE <,>    \ two addrs                                   | VARIABLE <CC>   \ Condition Code                              | VARIABLE <M>    \ mode searched for                           | VARIABLE <LDC>  \ LDC Instruction                             | VARIABLE <LDE>  \ LDE Instruction                             | VARIABLE <OPC>  \ OPCode                                | : RESET       ( clears all variables )                                <$>     OFF     <,> OFF                                         <CC>    OFF     <M> OFF                                         <LDC>   OFF     <LDE> OFF                                       <OPC>   OFF     SP@ SSP ! ;                                                                                             \ local labels                               hfs 15:33 09.03.91 DECIMAL                                                         | CREATE $TAB 40 ALLOT                                                                                                          | : CLR$TAB $TAB 40 ERASE ;                                                                                                     | : $: CREATE C,                                                       DOES> C@  $TAB + 2+ HERE SWAP ! ;                        | : $  CREATE C,                                                       DOES> C@  $TAB + <$> ON ;                                                                                                00 $:  1$:  04 $:  2$:  08 $:  3$:  12 $:  4$:  16 $:  5$:      20 $:  6$:  24 $:  7$:  28 $:  8$:  32 $:  9$:  36 $: 10$:                                                                      00 $   1$   04 $   2$   08 $   3$   12 $   4$   16 $   5$       20 $   6$   24 $   7$   28 $   8$   32 $   9$   36 $  10$       \ READY  CHECK                              hfs ( 11.06.90/KK ) DECIMAL                                                           : READY RESET CLR$TAB ;                                                                                                         : CHECK                                                          $TAB DUP  40 +  SWAP                                            DO  I @  ?DUP                                                      IF  I 2+ @  DUP 0= ERROR" Unresolved Local Label"                  BEGIN  OVER @  ROT ROT                                                 TUCK  SWAP  !                                                   OVER 0=                                                  UNTIL  2DROP                                                 THEN                                                         4 +LOOP                                                         CLR$TAB ;                                                                                                                    \ M #S? #D? CC?                              hfs 15:35 09.03.91 HEX                                                             \  7 6 5 4 | 3 2 1 0    7 6 5 4 3 2 1 0     7 6 5 4 3 2 1       \  #|#|   MODE                 M#                OPC                                                                            | : M   <M> @ ;  \ -- mode                                      | : #S?  M  080 AND 0= 0= ;                                     | : #D?  M  040 AND 0= 0= ;                                     | : CC?  M  0C0 AND 0= 0= ;                                                                                                     \ definings and dispatcher                   hfs  13:58 25.12.89| : ?PERFORM [ FORTH ] @ [ ASSEMBLER ] ?DUP IF EXECUTE THEN ;   | : (DISPATCH  2*  R@  DUP C@ R> + >R  + 1+ ?PERFORM ;          | : DISPATCH                                                        COMPILE (DISPATCH  DUP 2* 1+ C,                                 0 ?DO [ FORTH ] , [ ASSEMBLER ] LOOP ; IMMEDIATE            \ S? ?1ARG ?2ARG ?3ARG                       hfs 16:08 09.03.91                                                                 | : S?          ( -- N )                                          SSP [ FORTH ] @ [ ASSEMBLER ] SP@ - 2- 2/ ;                   | : ?1ARG        ( N -- )                                         S? 1 - ERROR" 1 Argument expected" ;                          | : ?2ARG        ( N -- )                                         S? 2 - ERROR" 2 Arguments expected" ;                         | : ?3ARG        ( N -- )                                         S? 3 - ERROR" 3 Arguments expected" ;                                                                                         | : WITHIN >R OVER > SWAP R> < 0= OR 0= ;                       | : 8B? ( n -- n f ) ( within -128 .. 127 ? )                       DUP -80 80 WITHIN ;                                         | : ?3B ( n -- n f ) ( within 0 .. 7 ? )                            DUP 0 8 WITHIN NOT ERROR" Bit# out of Range" ;              \ SEARCH.OPC                                 hfs 16:08 09.03.91                                                                 | : +OPC <OPC> +! ;     \ mask --                               | : OPC <OPC> [ FORTH ] @ [ ASSEMBLER ] ;       \ -- opc        | : LDC? <LDC> [ FORTH ] @ [ ASSEMBLER ] ;      \ -- f          | : LDE? <LDE> [ FORTH ] @ [ ASSEMBLER ] ;      \ -- f                                                                          | : SEARCH.OPC          ( taddr -- cfa )                          TRUE SWAP DUP C@ +OPC           ( correction opcode )           1+  [ FORTH ] @ [ ASSEMBLER ] DUP [ FORTH ] @ [ ASSEMBLER ]     SWAP 2+ ( tableaddr -- end+2 begin )                            ?DO I C@ M =                                                       IF DROP I DUP 1+ C@ +OPC 2+ [ FORTH ] @ [ ASSEMBLER ]           FALSE LEAVE THEN                                             4 +LOOP ERROR" Wrong Addressmode" ;                                                                                           \ OPC, MSK ODD ?LDE >W ?$                    hfs 14:10 24.03.91                                                                 | : OPC, OPC C, ;                                               | : 0FMSK 0F AND ;                                              | : 4SHL 10 * ;                                                 | : ODD ( BYTE -- ODD ) 01 OR ;                                 | : ?LDE LDE? IF ODD THEN ;                                     | : >W 0FMSK 0C0 OR ;                                           | : ?$  <$> [ FORTH ] @ [ ASSEMBLER ]                                   IF   LDC? LDE? OR ERROR" No local labels allowed"                    HERE OVER [ FORTH ] @ [ ASSEMBLER ] , SWAP !               ELSE , THEN ;                                           | : RA  ( addr -- RA)                                                   HERE  - 2-                                                      8B? NOT ERROR" Relative Addr. Out Of Range" ;                                                                           \ modes                                      hfs 16:10 09.03.91                                                                 | : W|O (   R -- W|O ) 4SHL +OPC ;                              | : D|O ( D S -- D|O ) SWAP 4SHL +OPC OPC, ;                    | : S|O ( D S -- S|O )      4SHL +OPC OPC, ;                    | : D|S ( D S -- D|S ) 0FMSK SWAP 4SHL OR ?LDE C, ;             | : S|D ( D S -- S|D ) 4SHL SWAP 0FMSK OR ?LDE C, ;             | : W|0 (   W -- W|0 ) 4SHL ?LDE C, ;                           | : O_W (   D -- D|O ) ?1ARG OPC 20 = IF 4SHL 0E OR C,                  (   D -- O W ) ELSE OPC, >W C, THEN ;                   | : O_D (   D -- O D )    ?1ARG OPC, C, ;                                                                                                                                                                                                                                                                                                                                                       \ modes                                      hfs 16:10 09.03.91                                                                 | : DO_W ( D S -- D|O W ) ?2ARG      D|O >W  C, ;               | : SO_W ( D S -- S|O W ) ?2ARG      S|O     C, ;               | : DO_S ( D S -- D|O S ) ?2ARG      D|O     C, ;               | : SO_D ( D S -- S|O D ) ?2ARG      S|O     C, ;               | : O_DS ( D S -- O D|S ) ?2ARG OPC, D|S         ;              | : O_SD ( D S -- O S|D ) ?2ARG OPC, S|D         ;              | : O_S_W ( D S -- O S W ) ?2ARG OPC, C, >W C, ;                | : O_W_D ( D S -- O W D ) ?2ARG OPC,     >W C, C, ;            | : O_D_W ( D S -- O D W ) ?2ARG OPC, SWAP C, >W C, ;           | : O_W_S ( D S -- O W S ) ?2ARG OPC, SWAP >W C, C, ;           | : O_W_W ( D S -- O W W )       OPC, >W C, >W C, ;             | : O_SW_DW ( D S -- O W W ) ?2ARG      O_W_W ;                 | : O_DW_SW ( D S -- O W W ) ?2ARG SWAP O_W_W ;                                                                                 \ modes                                      hfs 16:10 09.03.91                                                                 | : O_S_D ( D S -- O S D ) ?2ARG      OPC, C, C, ;              | : O_D_S ( D S -- O D S ) ?2ARG SWAP OPC, C, C, ;              | : ?LDX LDC? LDE? OR IF 40 +OPC THEN ;                         | : O_DS_SO ( D S x -- O D|S x) ?LDX OPC, >R   D|S R> C, ;      | : O_DS_LO ( D S X -- O D|S xl xh)  OPC, >R   D|S R> FLIP , ;  | : O_DS_X  ( D X S -- O D|S x oder O_D|S_xl_xh )                   ?3ARG SWAP 8B? IF O_DS_SO ELSE O_DS_LO THEN ;               | : O_SD_SO ( D S x -- O S|D x) ?LDX OPC, >R   S|D R> C, ;      | : O_SD_LO ( D S X -- O S|D xl xh)  OPC, >R   S|D R> FLIP , ;  | : O_SD_X  ( X D S -- O S|D x oder O_S|D_xl_xh )                   ?3ARG ROT  8B? IF O_SD_SO ELSE O_SD_LO THEN ;               | : O_SD_RA ( D S addr -- O S|D RA)                                 ?3ARG 1- RA >R OPC, S|D R> C, ;                                                                                             \ modes                                      hfs 13:39 24.03.91                                                                 | : O_D0_DA ( D DA--O D|0 dh dl) ?2ARG OPC, SWAP W|0 FLIP ?$ ;  | : O_S0_DA ( DA S--O S|0 dh dl) ?2ARG OPC,      W|0 FLIP ?$ ;                                                                  | : CC|O CC? IF <CC> C@ ELSE 80 THEN +OPC OPC, ;                | : CCO_DA   ( DA -- CC|O dl dh) ?1ARG CC|O ?$ ;                | : CCO_RA   ( addr -- CC|O RA)  ?1ARG RA CC|O C, ;             | : SO_RA  ( S addr --  S|O RA)  ?2ARG RA SWAP S|O C, ;         | : O_DA   ( DA -- O dl dh) ?1ARG OPC, ?$ ;                     | : O_W_IML ( D IML -- O W IML) ?2ARG OPC, SWAP >W C, ?$ ;      | : O_D_IML ( D IML -- O D IML) ?2ARG OPC, SWAP    C, ?$ ;                                                                      | : W|B|0 ( W # -- W|B|0 ) ?3B 2 * SWAP 4SHL OR     C, ;        | : W|B|1 ( W # -- W|B|1 ) ?3B 2 * SWAP 4SHL OR ODD C, ;                                                                        \ modes                                      hfs 16:10 09.03.91                                                                 | : O_DB0 ( D # -- O D|B|0) ?2ARG OPC, W|B|0 ;                  | : O_DB1 ( D # -- O D|B|1) ?2ARG OPC, W|B|1 ;                  | : O_DB0_S ( D S # -- O D|B|0 S )                                          ?3ARG OPC, SWAP >R W|B|0 R> C, ;                    | : O_SB1_D ( D # S -- O S|B|1 D )                                          ?3ARG OPC, SWAP W|B|1 C, ;                          | : O_DB0_W ( D S # -- O D|B|0 W )                                          ?3ARG OPC, SWAP >R W|B|0 R> >W C, ;                 | : O_SB1_W ( D # S -- O S|B|1 W )                                          ?3ARG OPC, SWAP W|B|1 >W C, ;                       | : O_SB0_RA ( addr S # -- O S|B|1 RA)                                      ?3ARG >R >R 1- RA R> R> OPC, W|B|0 C, ;             | : O_SB1_RA ( addr S # -- O S|B|1 RA)                                      ?3ARG >R >R 1- RA R> R> OPC, W|B|1 C, ;             \ SRP SRP0 SRP1                              hfs 16:10 09.03.91                                                                 : SRP0, 31 +OPC ?1ARG OPC, 0F8 AND 2 OR C, RESET ;              : SRP1, 31 +OPC ?1ARG OPC, 0F8 AND 1 OR C, RESET ;              : SRP,  31 +OPC ?1ARG OPC, C, RESET ;                                                                                           | : TABLE:        ( -- addr ) \ generate new table                 RESET  | CREATE  HERE                                           HERE 2+ [ FORTH ] , [ ASSEMBLER ] ;                                                                                          | : ;TABLE        ( addr -- ) \ change endpoint                    HERE SWAP ! ;                                                                                                                \ compiling opcodes for registermode                            | : TAB,          ( cfa opcode -- compiles mode opc cfa )          M C, C, [ FORTH ] , [ ASSEMBLER ] RESET ;                    \ M: CC: CC , #                              hfs 16:10 09.03.91                                                                 | : M:  CREATE DUP C, 1+    ( n -- n+1 )                                DOES> C@ <,> [ FORTH ] @ [ ASSEMBLER ]                          IF 8 * THEN <M> +! ;                                    | : CC: CREATE DUP C, 10 +  ( n -- n+1 )                                DOES> C@ <CC> C! 0C0 <M> +! ;                           | : CC  0C0 <M> +! ;                                                                                                              : ,   <,> ON ;                                                  : #   <,> [ FORTH ] @ [ ASSEMBLER ]                                   IF 80 ELSE 40 THEN <M> +! ;                                                                                                                                                                                                                                                                                             \ REGs AND CCs                               hfs 16:08 09.03.91                                                                 01 (  0001) M: R    1 - M: RR     1 +                              (  0011) M: @R       M: @RR                                     (  0101) M: (R       M: (RR                                     (  0111) M: @                DROP                            10 (  0001) CC: LT       CC: LE                                    (  0011) CC: ULE      CC: OV                                    (  0101) CC: MI       CC: Z    10 - CC: EQ                      (  0111) CC: C   10 - CC: ULT  10 + ( ALWAYS TRUE )             (  1001) CC: GE       CC: GT                                    (  1011) CC: UGT      CC: NOV                                   (  1101) CC: PL       CC: NZ   10 - CC: NE                      (  1111) CC: NC  10 - CC: UGE  DROP                                                                                                                                                          \ GROUPS                                     hfs 16:08 09.03.91                                                                 | : GROUP0: CREATE [ FORTH ] C, , [ ASSEMBLER ]                             DOES>  SEARCH.OPC EXECUTE RESET ;                   | : GROUP1: CREATE [ FORTH ] C, , [ ASSEMBLER ]                             DOES>  SEARCH.OPC <LDC> ON EXECUTE RESET ;          | : GROUP2: CREATE [ FORTH ] C, , [ ASSEMBLER ]                             DOES>  SEARCH.OPC <LDE> ON EXECUTE RESET ;          | : GROUP3: CREATE [ FORTH ] C,   [ ASSEMBLER ]                             DOES>  C@ +OPC OPC, RESET ;                                                                                                                                                                                                                                                                                                                                                                                                                         \ DEC                                        hfs 16:11 09.03.91                                                                 TABLE:  TDEC                                                            R   ' O_W   000 TAB,                ' O_D   000 TAB,            @R  ' O_W   001 TAB,            @   ' O_D   001 TAB,    ;TABLE  TDEC 000 GROUP0: DEC,       TDEC 010 GROUP0: RLC,               TDEC 020 GROUP0: INC,       TDEC 040 GROUP0: DA,                TDEC 050 GROUP0: POP,       TDEC 060 GROUP0: COM,               TDEC 070 GROUP0: PUSH,      TDEC 080 GROUP0: DECW,              TDEC 090 GROUP0: RL,        TDEC 0A0 GROUP0: INCW,              TDEC 0B0 GROUP0: CLR,       TDEC 0C0 GROUP0: RRC,               TDEC 0D0 GROUP0: SRA,       TDEC 0E0 GROUP0: RR,                TDEC 0F0 GROUP0: SWAP,                                                                                                                                                                                                                                  \ ADD                                        hfs 16:11 09.03.91                                                                 TABLE:  TADD                                                    R   ,   R   ' O_DS  002 TAB,    R   ,   @R  ' O_DS  003 TAB,    R   ,       ' O_S_W 004 TAB,        ,   R   ' O_W_D 004 TAB,        ,       ' O_S_D 004 TAB,    R   ,   @   ' O_S_W 005 TAB,        ,   @R  ' O_W_D 005 TAB,        ,   @   ' O_S_D 005 TAB,    R   ,   #   ' O_W_S 006 TAB,        ,   #   ' O_D_S 006 TAB,    ;TABLE  TADD 000 GROUP0: ADD,       TADD 010 GROUP0: ADC,               TADD 020 GROUP0: SUB,       TADD 030 GROUP0: SBC,               TADD 040 GROUP0: OR,        TADD 050 GROUP0: AND,               TADD 060 GROUP0: TCM,       TADD 070 GROUP0: TM,                TADD 0A0 GROUP0: CP,        TADD 0B0 GROUP0: XOR,                                                                                                                                                                                                       \ LD                                         hfs 16:11 09.03.91                                                                 TABLE:  TLD                                                     R   ,   #   ' DO_S  00C TAB,    R   ,   R   ' DO_W  008 TAB,    R   ,       ' DO_S  008 TAB,        ,   R   ' SO_W  009 TAB,        ,       ' O_S_D 0E4 TAB,    R   ,   @R  ' O_DS  0C7 TAB,        ,   @R  ' O_W_D 0E5 TAB,        ,   @   ' O_S_D 0E5 TAB,    R   ,   #   ' O_W_S 00C TAB,        ,   #   ' O_D_S 0E6 TAB,    @R  ,   #   ' O_W_S 0D6 TAB,    @   ,   #   ' O_D_S 0D6 TAB,    @R  ,   R   ' O_DS  0D7 TAB,    @R  ,       ' O_S_W 0F5 TAB,    @   ,   R   ' O_W_D 0F5 TAB,    R   ,   @   ' O_S_W 0E5 TAB,    @   ,       ' O_S_D 0F5 TAB,                                    R   ,   (R  ' O_DS_X 087 TAB,  (R  ,   R   ' O_SD_X 097 TAB,    ;TABLE  TLD 000 GROUP0: LD,                                                                                                                                                                     \ LDC CPIJE CPIJNE BOR BXOR LDB BAND         hfs 16:11 09.03.91                                                                 TABLE:  TLDC                                                    R   ,   @RR ' O_DS     0C3 TAB, @RR ,   R   ' O_SD     0D3 TAB, R   ,   (RR ' O_DS_X   0A7 TAB, (RR ,   R   ' O_SD_X   0B7 TAB, R   ,       ' O_D0_DA  0A7 TAB,     ,   R   ' O_S0_DA  0B7 TAB, ;TABLE  TLDC 000 GROUP1: LDC,       TLDC 000 GROUP2: LDE,       TABLE:  TCPIJE                                                  R   ,   @R  ' O_SD_RA   0C2 TAB,                                ;TABLE  TCPIJE 000 GROUP0: CPIJE,   TCPIJE 010 GROUP0: CPIJNE,  TABLE:  TBOR                                                    R   ,   R # ' O_DB0_W 007 TAB,  R   ,     # ' O_DB0_S 007 TAB,  R # ,   R   ' O_SB1_W 007 TAB,    # ,   R   ' O_SB1_D 007 TAB,  ;TABLE  TBOR 000 GROUP0: BOR,       TBOR 020 GROUP0: BXOR,              TBOR 040 GROUP0: LDB,       TBOR 060 GROUP0: BAND,                                                                      \ BOR                                        hfs 16:11 09.03.91                                                                 TABLE:  TCALL                                                           #   ' O_D   0D4 TAB,            @RR ' O_W   0F4 TAB,            @   ' O_D   0F4 TAB,                ' O_DA  0F6 TAB,    ;TABLE  TCALL 000 GROUP0: CALL,                                 TABLE:  TBCP                                                    R   ,   R # ' O_DB0_W 017 TAB,  R   ,     # ' O_DB0_S 017 TAB,  ;TABLE  TBCP 000 GROUP0: BCP,                                   TABLE:  TLDCD                                                   R   ,   @RR ' O_DS     0E2 TAB,                                 ;TABLE  TLDCD 000 GROUP1: LDCD,     TLDCD 001 GROUP1: LDCI,             TLDCD 000 GROUP2: LDED,     TLDCD 001 GROUP2: LDEI,                                                                                                                                                                                                     \ LD                                         hfs 16:11 09.03.91                                                                 TABLE:  TLDCPD                                                  @RR ,   R   ' O_SD     0F2 TAB,                                 ;TABLE  TLDCPD 000 GROUP1: LDCPD,   TLDCPD 001 GROUP1: LDCPI,           TLDCPD 000 GROUP2: LDEPD,   TLDCPD 001 GROUP2: LDEPI,   TABLE:  TJP                                                                 ' CCO_DA  00D TAB,  CC  ,       ' CCO_DA  00D TAB,          @RR ' O_W     030 TAB,          @   ' O_D     030 TAB,  ;TABLE  TJP 000 GROUP0: JP,                                     TABLE:  TJR                                                                 ' CCO_RA  00B TAB,  CC ,        ' CCO_RA  00B TAB,  ;TABLE  TJR 000 GROUP0: JR,                                     TABLE:  TDJNZ                                                   R   ,       ' SO_RA   00A TAB,                                  ;TABLE  TDJNZ 000 GROUP0: DJNZ,                                 \ MULT                                       hfs 16:11 09.03.91                                                                 TABLE:  TBTJRF       , R # ' O_SB0_RA 037 TAB,                  ;TABLE  TBTJRF 000 GROUP0: BTJRF,                               TABLE:  TBTJRT       , R # ' O_SB1_RA 037 TAB,                  ;TABLE  TBTJRT 000 GROUP0: BTJRT,                               TABLE:  TMULT                                                   RR  ,   R   ' O_SW_DW 084 TAB,    RR  ,       ' O_S_W 084 TAB,      ,   R   ' O_W_D 084 TAB,        ,       ' O_S_D 084 TAB,    RR  ,   @R  ' O_SW_DW 085 TAB,    RR  ,   @   ' O_S_W 085 TAB,      ,   @R  ' O_W_D 085 TAB,        ,   @   ' O_S_D 085 TAB,    RR  ,   #   ' O_S_W 086 TAB,        ,   #   ' O_S_D 086 TAB,    ;TABLE  TMULT 000 GROUP0: MULT,     TMULT 010 GROUP0: DIV,                                                                                                                                                                                                      \ LDW                                        hfs 16:11 09.03.91                                                                 TABLE: TBITC    R   ,   #   ' O_DB0  057 TAB, ;TABLE            TBITC  000 GROUP0: BITC,   TBITC 020 GROUP0: BITR,              TABLE: TBITS    R   ,   #   ' O_DB1  077 TAB, ;TABLE            TBITS  000 GROUP0: BITS,                                                                                                        TABLE: TLDW                                                     RR  ,   RR  ' O_SW_DW 0C4 TAB,    RR  ,       ' O_S_W 0C4 TAB,      ,   RR  ' O_W_D 0C4 TAB,        ,       ' O_S_D 0C4 TAB,    RR  ,   @R  ' O_SW_DW 0C5 TAB,    RR  ,   @   ' O_S_W 0C5 TAB,      ,   @R  ' O_W_D 0C5 TAB,        ,   @   ' O_S_D 0C5 TAB,    RR  ,   #   ' O_W_IML 0C6 TAB,      ,   #   ' O_D_IML 0C6 TAB,  ;TABLE                                                          TLDW  000 GROUP0: LDW,                                                                                                          \ P0PUD POPUI PUSHUD PUSHUI                  hfs 16:11 09.03.91                                                                 TABLE:  TPOPUD                                                  R   ,   @R  ' O_SW_DW 092 TAB,    R   ,   @   ' O_S_W 092 TAB,      ,   @R  ' O_W_D 092 TAB,        ,   @   ' O_S_D 092 TAB,    ;TABLE  TPOPUD 000 GROUP0: POPUD,   TPOPUD 001 GROUP0: POPUI,   TABLE:  TPUSHUD                                                 @R  ,   R   ' O_DW_SW 082 TAB,    @R  ,       ' O_W_S 082 TAB,  @   ,   R   ' O_D_W 082 TAB,    @   ,       ' O_D_S 082 TAB,    ;TABLE  TPUSHUD 000 GROUP0: PUSHUD, TPUSHUD 001 GROUP0: PUSHUI,                                                                 00F GROUP3: NEXT,   01F GROUP3: ENTER,      02F GROUP3: EXIT,   03F GROUP3: WFI,    04F GROUP3: SB0,        05F GROUP3: SB1,    08F GROUP3: DI,     09F GROUP3: EI,         0AF GROUP3: RET,    0BF GROUP3: IRET,   0CF GROUP3: RCF,        0DF GROUP3: SCF,    0EF GROUP3: CCF,    0FF GROUP3: NOP,                            \ FORTH-Registerbelegungen                   hfs 16:11 09.03.91                                                                 | : RR:  CREATE C, DOES> RR  C@ ;                                 0E RR: AX       0C RR: BX       0A RR: CX       08 RR: DX       06 RR: FSP      04 RR: FUP      02 RR: FFP      00 RR: TEMPX                                                                  | : @RR: CREATE C, DOES> @RR C@ ;                                 0E @RR: @AX     0C @RR: @BX     0A @RR: @CX     08 @RR: @DX     06 @RR: @FSP    04 @RR: @FUP    02 @RR: @FFP    00 @RR: @TEMPX                                                                | : (RR: CREATE C, DOES> (RR C@ ;                                 0E (RR: (AX     0C (RR: (BX     0A (RR: (CX     08 (RR: (DX     06 (RR: (FSP    04 (RR: (FUP    02 (RR: (FFP                                                                                                                                                                                                                  \ FORTH-Registerbelegungen                   hfs 16:12 09.03.91                                                                 | : R:   CREATE C, DOES> R   C@ ;                                 0E R: AH        0F R: AL        0C R: BH        0D R: BL        0A R: CH        0B R: CL        08 R: DH        09 R: DL        06 R: FSPH      07 R: FSPL      04 R: FUPH      05 R: FUPL      02 R: FFPH      03 R: FFPL      00 R: TEMPH     01 R: TEMPL   | : @R:  CREATE C, DOES> @R  C@ ;                                 0E @R: @AH      0F @R: @AL      0C @R: @BH      0D @R: @BL      0A @R: @CH      0B @R: @CL      08 @R: @DH      09 @R: @DL      01 @R: @TEMPH   00 @R: @TEMPL                                 | : (R:  CREATE C, DOES> (R  C@ ;                                 0E (R: (AH      0F (R: (AL      0C (R: (BH      0D (R: (BL      0A (R: (CH      0B (R: (CL      08 (R: (DH      09 (R: (DL      00 (R: (TEMPH   01 (R: (TEMPL                                                                                                 \ MAKROS Routinen fuer LDCW                  hfs 16:03 09.03.91 HEX                                                             | : RR,@RR OVER OVER >R >R LDC, R R> 1+ , 1 (RR R> LDC, ;       | : @RR,RR OVER OVER >R >R LDC, 1 (RR R> , R R> 1+ LDC, ;       | : RR,(RR ROT DUP >R ROT DUP >R ROT DUP >R LDC,                    R> R> 1+ R> 1+ SWAP ROT         R , (RR LDC, ;              | : (RR,RR ROT DUP >R ROT DUP >R ROT DUP >R LDC,                    R> 1+ R> R> 1+ SWAP ROT         (RR , R LDC, ;              | : RR,DA  OVER OVER >R >R LDC, R R> 1+ , R> 1+ LDC, ;          | : DA,RR  OVER OVER >R >R LDC, R> 1+ , R R> 1+ LDC, ;          TABLE:  TLDCW                                                   RR  ,   @RR ' RR,@RR   000 TAB, @RR ,   RR  ' @RR,RR   000 TAB, RR  ,   (RR ' RR,(RR   000 TAB, (RR ,   RR  ' (RR,RR   000 TAB, RR  ,       ' RR,DA    000 TAB,     ,   RR  ' DA,RR    000 TAB, ;TABLE  TLDCW 000 GROUP1: LDCW                                                                                                  \ MAKROS LDCW                                hfs 16:12 09.03.91                                                                   : PUSHW       ( Reg -- ) ( 16-Bit-Reg. zum Datenstack )          <M> OFF >R @FSP , R R@ 1+ LDCPD, @FSP , R R> LDCPD, ;                                                                          : POPW        ( Reg -- ) ( 16-Bit-Reg. vom Datenstack )          <M> OFF >R R R@ , @FSP LDCI, R R> 1+ , @FSP LDCI, ;                                                                          | : RF: CREATE C, DOES> C@ ;                                       0D0 RF: P0    0D1 RF: P1     0D2 RF: P2      0D3 RF: P3         0D4 RF: P4    0D5 RF: FLAGS  0D6 RF: RP0     0D7 RF: RP1        0D8 RF: FRP   0D8 RF: FRPH   0D9 RF: FRPL                       0DA RF: IP    0DA RF: IPH    0DB RF: IPL                        0DC RF: IRQ   0DD RF: IMR    0DE RF: SYM                                                                                                                                                     \ Bank 0 Bank 1                              hfs 16:12 09.03.91                                                                 \ Bank 0                                                           0E0 RF: C0CT  0E1 RF: C1CT   0E2 RF: C0CH    0E3 RF: C0CL       0E4 RF: C1CH  0E5 RF: C1CL   0EB RF: UTC     0EC RF: URC        0ED RF: UIE   0EF RF: UIO    0F0 RF: P0M     0F1 RF: PM         0F4 RF: H0C   0F5 RF: H1C    0F6 RF: P4D     0F7 RF: P4OD       0F8 RF: P2AM  0F9 RF: P2BM   0FA RF: P2CM    0FB RF: P2DM       0FC RF: P2AIP 0FD RF: P2BIP  0FE RF: EMT     0FF RF: IPR     \ Bank 1                                                           0E0 RF: C0M   0E1 RF: C1M    0E2 RF: C0TCH   0E3 RF: C0TCL      0E4 RF: C1TCH 0E5 RF: C1TCL  0F0 RF: DCH     0F1 RF: DCL        0F8 RF: UBGH  0F9 RF: UBGL   0FA RF: UMA     0FB RF: UMB        0FE RF: WUMCH 0FF RF: WUMSK                                                                                                                                                                  \ END-PROC  END-CODE                         hfs 15:59 09.03.91                                                                   FORTH DEFINITIONS                                                                                                               : END-PROC                                                       [ ASSEMBLER ] CHECK [ FORTH ] REVEAL  FORTH ;                  : END-CODE                                                       [COMPILE] END-PROC ;                                           : ;CODE                                                          DUP FALSE ?PAIRS  DROP [COMPILE] DOES> -3 ALLOT STATE OFF       [ ASSEMBLER ] READY [ FORTH ] ASSEMBLER ; IMMEDIATE            : PROC                                                           CREATE  HIDE [ ASSEMBLER ] READY [ FORTH ] ASSEMBLER ;         : CODE                                                           [COMPILE] PROC  -3 ALLOT ;                                                                                                   