Fix m* implementation, correct word list in README

This commit is contained in:
Piotr Wiszowaty 2016-06-29 22:10:46 +02:00 committed by Piotr Wiszowaty
parent cd8f1ae7d2
commit 03f471ba7e
2 changed files with 15 additions and 15 deletions

View File

@ -191,7 +191,7 @@ Words
`+loop` `lshift` `<=` `<` `>=` `>` `-` `+` `or` `over` `rshift` `rsp` `sp` `swap` `unloop` `u<` `u>` `while` `<>`
`=` `!` `[` `]` `[code]` `[end-code]` `cell` `cells` `not` `[text-section]` `[data-section]`
`variable` `2variable` `constant` `create` `,` `c,` `,'` `'` `,"` `"` `allot`
`lit` `\` `(` `recursive` `[label]` `*` `/` `u*`
`lit` `\` `(` `recursive` `[label]` `*` `/` `m*`
Usage
-----

28
foco65
View File

@ -1879,8 +1879,8 @@ m_star_n2_plus
lda #0
sta tmp+0
sta tmp+1
sta tmp+2
sta tmp+3
sta tmp2+0
sta tmp2+1
; tmp := w * z
ldy #16
m_star_loop
@ -1889,15 +1889,15 @@ m_star_loop
bcc m_star_next
lda z
clc
adc tmp+2
sta tmp+2
adc tmp2+0
sta tmp2+0
lda z+1
adc tmp+3
sta tmp+3
adc tmp2+1
sta tmp2+1
m_star_next
clc
ror tmp+3
ror tmp+2
ror tmp2+1
ror tmp2+0
ror tmp+1
ror tmp+0
dey
@ -1914,23 +1914,23 @@ m_star_next
eor #$FF
adc #0
sta tmp+1
lda tmp+2
lda tmp2+0
eor #$FF
adc #0
sta tmp+2
lda tmp+3
sta tmp2+0
lda tmp2+1
eor #$FF
adc #0
sta tmp+3
sta tmp2+1
m_star_done
; push result on the stack
lda tmp+0
sta pstack+2,x
lda tmp+1
sta pstack+3,x
lda tmp+2
lda tmp2+0
sta pstack+0,x
lda tmp+3
lda tmp2+1
sta pstack+1,x
jmp next
[end-code] ;