mirror of
https://github.com/piotr-wiszowaty/foco65.git
synced 2024-12-04 11:49:54 +00:00
Add words: >r r>
This commit is contained in:
parent
1fa534c871
commit
731a94d211
@ -187,8 +187,8 @@ or:
|
||||
Words
|
||||
-----
|
||||
|
||||
`+loop` `lshift` `<=` `<` `>=` `>` `-` `+` `or` `over` `rshift` `rsp` `sp` `swap` `unloop` `u<` `u>` `while` `<>`
|
||||
`:` `@` `0=` `1-` `1+` `2/` `2*` `2@` `2!` `and` `c!` `c@` `cmove` `count` `d-` `d+` `d=` `do` `drop` `dup` `fill` `i` `j` `loop`
|
||||
`+loop` `lshift` `<=` `<` `>=` `>` `-` `+` `or` `over` `rshift` `rsp` `sp` `swap` `unloop` `u<` `u>` `while` `<>` `>r` `<r`
|
||||
`=` `!` `[` `]` `[code]` `[end-code]` `cell` `cells` `not` `[text-section]` `[data-section]`
|
||||
`variable` `2variable` `constant` `create` `,` `c,` `,'` `'` `,"` `"` `allot`
|
||||
`lit` `\` `(` `recursive` `[label]` `*` `/` `m*`
|
||||
|
26
foco65
26
foco65
@ -1954,6 +1954,32 @@ m_star_done
|
||||
sta pstack+1,x
|
||||
jmp next
|
||||
[end-code] ;
|
||||
|
||||
: >r ( x -- ) ( R: -- x )
|
||||
[label] to_r
|
||||
[code]
|
||||
lda pstack+1,x
|
||||
pha
|
||||
lda pstack+0,x
|
||||
pha
|
||||
inx
|
||||
inx
|
||||
jmp next
|
||||
[end-code] ;
|
||||
|
||||
: r> ( -- x ) ( R: x -- )
|
||||
[label] r_from
|
||||
[code]
|
||||
pla
|
||||
tay
|
||||
pla
|
||||
dex
|
||||
sta pstack,x
|
||||
dex
|
||||
tya
|
||||
sta pstack,x
|
||||
jmp next
|
||||
[end-code] ;
|
||||
"""
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
|
Loading…
Reference in New Issue
Block a user