mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-12-27 22:30:04 +00:00
1 line
23 KiB
Plaintext
1 line
23 KiB
Plaintext
|
\ 8086 Assembler cas 10nov05This 8086 Assembler was written by Klaus Schleisiek. Assembler Definitions are created with the definig word CODE and closed with the word END-CODE. The 8086 Registers naming and usage in volksFORTH Intel vForth Used for 8bit-Register AX A free A+ A- DX D topmost Stackitem D+ D- CX C free C+ C- BX R Returnstack Pointer R+ R- BP U User Pointer SP S Stack Pointer SI I Instruction Pointer DI W Word Pointer, mostly free \ 8086 Assembler loadscreen cas 10nov05 Onlyforth | : u2/ ( 16b -- 15b ) 2/ $7FFF and ; | : 8* ( 15b -- 16b ) 2* 2* 2* ; | : 8/ ( 16b -- 13b ) u2/ 2/ 2/ ; Vocabulary Assembler Assembler also definitions 3 &21 thru clear .( Assembler loaded ) cr \ conditional Assembler compiler cas 10nov05 here : temp-assembler ( addr -- ) hide last off dp ! " ASSEMBLER" find nip ?exit here $1800 + sp@ u> IF display cr ." Assembler won't fit" abort THEN here sp@ $1800 - dp ! 1 load dp ! ; temp-assembler \\ : blocks ( n -- addr / ff ) first @ >r dup 0 ?DO freebuffer LOOP [ b/blk negate ] Literal * first @ + r@ u> r> and ; \ Code generating primitives cas 10nov05 Variable >codes \ points at table of execution vectors | Create nrc ] c, , here ! c! [ : nonrelocate nrc >codes ! ; nonrelocate | : >exec ( n -- n+2 ) Create dup c, 2+ Does> c@ >codes @ + perform ; 0 | >exec >c, | >exec >, | >exec >here | >exec >! | >exec >c! drop
|