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

28
foco65
View File

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