version 1.1, 1997/05/29 19:43:09
|
version 1.4, 2002/10/02 15:31:13
|
Line 2
|
Line 2
|
|
|
Vocabulary assembler |
Vocabulary assembler |
also assembler also definitions forth |
also assembler also definitions forth |
|
\ [IFUNDEF] cross |
|
\ : X ; |
|
\ [THEN] |
|
|
\ sources |
\ sources |
|
|
Line 16 $A Constant ZF $C Constant CF
|
Line 19 $A Constant ZF $C Constant CF
|
$0 Constant JMP $1 Constant JS |
$0 Constant JMP $1 Constant JS |
$2 Constant JZ $4 Constant JC |
$2 Constant JZ $4 Constant JC |
|
|
|
$7 Constant *ACCU |
( $8 Constant ACCU ) $9 Constant SUB |
( $8 Constant ACCU ) $9 Constant SUB |
$A Constant SUBR $B Constant ADD |
( $A Constant SUBR ) $B Constant ADD |
$C Constant XOR $D Constant OR |
$C Constant XOR $D Constant OR |
$E Constant AND $F Constant SHR |
$E Constant AND $F Constant SHR |
|
|
$FFFC Constant tx |
$FFFC Constant txd |
|
$FFFF Constant rx? |
|
$FFFE Constant rxd |
\ $FFF0 Constant tx |
\ $FFF0 Constant tx |
|
|
: end-label previous ; |
: end-label previous ; |
|
|
Create marks $10 cells allot |
Create marks $10 cells allot |
|
|
: ahere s" here" evaluate 2/ ; |
: ahere X here 2/ ; |
|
|
: m ( n -- ) cells marks + ahere 2* swap ! 0 ; |
: m ( n -- ) cells marks + ahere 2* swap ! 0 ; |
: r ( n -- ) cells marks + @ ahere swap s" !" evaluate 0 ; |
: r ( n -- ) cells marks + @ ahere swap s" !" evaluate 0 ; |
Line 50 Create marks $10 cells allot
|
Line 56 Create marks $10 cells allot
|
r> $10 /string 0 max rot $10 + -rot |
r> $10 /string 0 max rot $10 + -rot |
REPEAT drop 2drop ; |
REPEAT drop 2drop ; |
|
|
: sym base @ >r hex |
\ : sym |
cr ." sym:s/PC=" ahere 4 0.r ." /" bl word count type ." /g" cr |
\ base @ >r hex |
r> base ! ; |
\ cr ." sym:s/PC=" ahere 4 0.r ." /" bl word count type ." /g" cr |
|
\ r> base ! ; |
: label ahere Constant ; |
: sym bl word drop ; |
|
|
|
: label |
|
>in @ bl word count X here symentry >in ! |
|
ahere Constant ; |
|
|
also forth definitions |
also forth definitions |
|
|
Line 64 also forth definitions
|
Line 74 also forth definitions
|
: (end-code) previous ; |
: (end-code) previous ; |
|
|
previous previous previous |
previous previous previous |
|
|