Explorar el Código

Add word A,

This would be useful, for example, to allow the assembler to write
straight to an AT28 EEPROM without going to RAM. This would be a
life saver in machines with tight RAM such as the SMS.
master
Virgil Dupras hace 3 años
padre
commit
de7cb4a80f
Se han modificado 9 ficheros con 16 adiciones y 16 borrados
  1. +2
    -2
      blk/007
  2. +0
    -1
      blk/032
  3. +2
    -2
      blk/051
  4. +1
    -1
      blk/363
  5. +1
    -0
      blk/385
  6. +1
    -1
      blk/390
  7. BIN
      cvm/forth.bin
  8. +6
    -6
      doc/impl.txt
  9. +3
    -3
      doc/usage.txt

+ 2
- 2
blk/007 Ver fichero

@@ -4,8 +4,8 @@
;
: PC H@ ORG @ - BIN( @ + ;
( A, spits an assembled byte, A,, spits an assembled word
Both increase PC. To debug, change C, to .X )
: A, C, ; : A,, SPLITB A, A, ;
Both increase PC. )
: A,, SPLITB A, A, ;
: <<3 3 LSHIFT ; : <<4 4 LSHIFT ;
( As a general rule, IX and IY are equivalent to spitting an
extra 0xdd / 0xfd and then spit the equivalent of HL )


+ 0
- 1
blk/032 Ver fichero

@@ -3,5 +3,4 @@
256 /MOD SWAP
;
: PC H@ ORG @ - BIN( @ + ;
: A, C, ;
: A,, SPLITB A, A, ;

+ 2
- 2
blk/051 Ver fichero

@@ -6,5 +6,5 @@ VARIABLE L1 VARIABLE L2 VARIABLE L3 VARIABLE L4
( We divide by 2 because each PC represents a word. )
: PC H@ ORG @ - 1 RSHIFT ;
( A, spits an assembled byte, A,, spits an assembled word
Both increase PC. To debug, change C, to .X )
: A, C, ; : A,, SPLITB A, A, ;
Both increase PC. )
: A,, SPLITB A, A, ;

+ 1
- 1
blk/363 Ver fichero

@@ -4,7 +4,7 @@ SYSVARS 0x0c + :** C<*
0x08 RAM+ ( C<* override ) @
?DUP NOT IF C<* ELSE EXECUTE THEN ;
: , H@ ! H@ 2+ HERE ! ;
: C, H@ C! H@ 1+ HERE ! ;
: C, H@ C!+ HERE ! ;
: ,"
BEGIN
C< DUP 34 ( ASCII " ) = IF DROP EXIT THEN C,


+ 1
- 0
blk/385 Ver fichero

@@ -5,6 +5,7 @@
( Now, adev stuff )
SYSVARS 0x3e + :** A@
SYSVARS 0x40 + :** A!
SYSVARS 0x42 + :** A,

( src dst u -- )
: AMOVE


+ 1
- 1
blk/390 Ver fichero

@@ -7,7 +7,7 @@
['] (emit) ['] EMIT **! ['] (key) ['] KEY **!
['] CRLF ['] NL **!
['] (boot<) ['] C<* **!
['] C@ ['] A@ **! ['] C! ['] A! **!
['] C@ ['] A@ **! ['] C! ['] A! **! ['] C, ['] A, **!
( boot< always has a char waiting. 06 == C<?* )
1 0x06 RAM+ ! INTERPRET
RDLN$ LIT" _sys" [entry]


BIN
cvm/forth.bin Ver fichero


+ 6
- 6
doc/impl.txt Ver fichero

@@ -125,12 +125,12 @@ Here's a list of them:
SYSVARS FUTURE USES +3c BLK(*
+02 CURRENT +3e A@*
+04 HERE +40 A!*
+06 C<? +42 FUTURE USES
+08 C<* override +51 CURRENTPTR
+0a NLPTR +53 (emit) override
+0c C<* +55 (key) override
+0e WORDBUF +57 FUTURE USES
+2e BOOT C< PTR
+06 C<? +42 A,*
+08 C<* override +44 FUTURE USES
+0a NLPTR +51 CURRENTPTR
+0c C<* +53 (emit) override
+0e WORDBUF +55 (key) override
+2e BOOT C< PTR +57 FUTURE USES
+30 IN>
+32 IN(* +70 DRIVERS
+34 BLK@* +80 RAMEND


+ 3
- 3
doc/usage.txt Ver fichero

@@ -84,9 +84,9 @@ need switches in regular code.

# Addressed devices

A@ and A! are the indirect versions of C@ and C!. They are
aliases and initially point to C@ and C!. There is also a AMOVE
word that is the same as MOVE but using A@ and A!.
A@, A! and A, are the indirect versions of C@, C! and C,. They
are switch words and initially point to C@, C! and C,. There is
also a AMOVE word that is the same as MOVE but using A@ and A!.

Addressed device words can be useful to "pipe" processing to
places outside of regular memory.


Cargando…
Cancelar
Guardar