Przeglądaj źródła

Remove BIT@ and BIT!

They were only used in the ti84 recipe and were not worth their cost.
master
Virgil Dupras 3 lat temu
rodzic
commit
04bd57b527
4 zmienionych plików z 4 dodań i 12 usunięć
  1. +0
    -6
      blk/364
  2. BIN
      cvm/forth.bin
  3. +0
    -2
      doc/dict.txt
  4. +4
    -4
      recipes/ti84/blk/618

+ 0
- 6
blk/364 Wyświetl plik

@@ -6,9 +6,3 @@
;
: , H@ ! H@ 2+ HERE ! ;
: C, H@ C! H@ 1+ HERE ! ;
: BIT@ ( bit addr -- f ) C@ SWAP RSHIFT 0x01 AND ;
: BIT! ( f bit addr -- )
SWAP 0x01 SWAP LSHIFT ROT ( addr mask f )
IF OVER C@ OR
ELSE 0xff XOR OVER C@ AND THEN ( addr flg )
SWAP C! ;

BIN
cvm/forth.bin Wyświetl plik


+ 0
- 2
doc/dict.txt Wyświetl plik

@@ -151,8 +151,6 @@ J -- n Copy RS third item to PS
! n a -- Store n in address a
? a -- Print value of addr a
+! n a -- Increase value of addr a by n
BIT@ b a -- f Get bit b from addr a.
BIT! f b a -- Set bit b to f in addr a.
C@ a -- c Set c to byte at address a
C@+ a -- a+1 c Fetch c from a and inc a.
C@- a -- a-1 c Fetch c from a and dec a.


+ 4
- 4
recipes/ti84/blk/618 Wyświetl plik

@@ -7,7 +7,7 @@ CREATE _atbl
0x20 C, 'Y' C, 'T' C, 'O' C, 'J' C, 'E' C, 'B' C, 0 C,
0 C, 'X' C, 'S' C, 'N' C, 'I' C, 'D' C, 'A' C, 0x80 C,
0 C, 0 C, 0 C, 0 C, 0 C, 0x81 ( 2nd ) C, 0 C, 0x7f C,
: _2nd@ 0 [ KBD_MEM LITN ] BIT@ ;
: _2nd! 0 [ KBD_MEM LITN ] BIT! ;
: _alock@ 1 [ KBD_MEM LITN ] BIT@ ;
: _alock^ _alock@ NOT 1 [ KBD_MEM LITN ] BIT! ;
: _2nd@ [ KBD_MEM LITN ] C@ 1 AND ;
: _2nd! [ KBD_MEM LITN ] C@ 0xfe AND + [ KBD_MEM LITN ] C! ;
: _alock@ [ KBD_MEM LITN ] C@ 2 AND ;
: _alock^ [ KBD_MEM LITN ] C@ 2 XOR [ KBD_MEM LITN ] C! ;

Ładowanie…
Anuluj
Zapisz