diff --git a/blk/364 b/blk/364 index 865da53..a24ff76 100644 --- a/blk/364 +++ b/blk/364 @@ -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! ; diff --git a/cvm/forth.bin b/cvm/forth.bin index eaa38a2..f06405d 100644 Binary files a/cvm/forth.bin and b/cvm/forth.bin differ diff --git a/doc/dict.txt b/doc/dict.txt index 61d50f4..ed89469 100644 --- a/doc/dict.txt +++ b/doc/dict.txt @@ -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. diff --git a/recipes/ti84/blk/618 b/recipes/ti84/blk/618 index 6847457..377fd39 100644 --- a/recipes/ti84/blk/618 +++ b/recipes/ti84/blk/618 @@ -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! ;