dos_compilers/DX-FORTH v430/LOCALS.SCR

1 line
11 KiB
Plaintext
Raw Normal View History

2024-07-09 18:07:02 +02:00
\ locals based on locals code by B. Muench ( ANS ) (LOCAL) LOCALS| TO ( optional ) ADDR \ locals forth definitions decimal application 2 #screens 1- thru \ locals #20 user LP \ locals pointer (don't change) \ add locals to CATCH -? : CATCH ( xt -- except# | 0 ) lp @ >r catch r> over if lp ! else drop then ; \ locals label ladr \ BX <- address of local LP [up] bx mov byte lods ah ah sub ax bx sub ret end-code code L@ ( -- x ) \ fetch local ladr ) call 0 [bx] push next end-code code L! ( x -- ) \ store local ladr ) call 0 [bx] pop next end-code code L& ( -- addr ) \ address of local ladr ) call bx push next end-code