SamCoVT / TaliForth2

A Subroutine Threaded Code (STC) ANSI-like Forth for the 65c02
Other
28 stars 4 forks source link

NN detection needs assembler word jmp updated #113

Closed SamCoVT closed 3 weeks ago

SamCoVT commented 1 month ago

If the jmp assembly instruction is used, the current word should be marked NN. This might be a bit tricky, as you'll want to make sure you are in the middle of a definition, but you might be in interpreting mode as that's how the assembler words are often used when they need to take an argument (the assembler words are immediate, but you need to be in interpreting mode to put their arguments on the stack before running them). Here's some examples showing common usage - both cword and dword should be NN:

assembler-wordlist >order
: aword dup drop ;
: cword [ ' aword jmp ] ;
: dword [ ' aword ] jmp ;

see cword 
nt: 879  xt: 886 
flags (CO AN IM NN HC ST): 0 0 0 0 0 0 
size (decimal): 3 

0886  4C 0D 08  L..

886    80D jmp
 ok

see dword 
nt: 88A  xt: 897 
flags (CO AN IM NN HC ST): 0 0 0 0 0 0 
size (decimal): 3 

0897  4C 0D 08  L..

897    80D jmp
 ok
patricksurry commented 1 month ago

you can give this one to me