mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-12-24 18:32:02 +00:00
1 line
44 KiB
Plaintext
1 line
44 KiB
Plaintext
|
\ \ A disassembler for the 8086 by Charles Curley cas 10nov05\ adapted to volksFORTH-83 by B. Molte | : internal 1 ?head ! ; | : external ?head off ; onlyFORTH forth DEFINITIONS DECIMAL VOCABULARY DISAM DISAM also DEFINITIONS 2 capacity 1- thru onlyforth cr .( Use DIS <name> to disassemble word. ) cr .( ESC will stop the output. ) \ cas 10nov05 internal : [and] and ; \ the forth and : [or] or ; : mask ( n maskb -- n n' ) over and ; 5 constant 5 \ save some space 6 constant 6 7 constant 7 8 constant 8 \ internal : EXEC [and] 2* R> + PERFORM ; : STOP[ 0 ?pairs [compile] [ reveal ; immediate restrict code shift> \ n ct --- n' | shift n right ct times D C mov D pop D C* shr next end-code \ : shift> 0 ?DO 2/ ( shift's artihm.!) $7FFF and LOOP ; code SEXT \ n --- n' | sign extend lower half of n to upper D A mov cbw A D mov next end-code \ : hsext $FF and dup $80 and IF $FF00 or THEN ;
|