参考
掛け算様々
mul.asm
; z88dk / WebMSX
; z80asm -b -l mul.asm
; appmake +msx -b mul.bin --org=0xd000
org $d000
start:
push hl
pop ix
ld e, (ix+2)
ld d, 0
ld a, (ix+3)
ld hl, 0
ld b, 8
.loop
add hl, hl
add a, a
jr nc, skip
add hl, de
.skip
djnz loop
ld (ix+2), l
ld (ix+3), h
ret
mul.bas
10 clear 100,&hcfff
20 defint a-z
30 def usr=&hd000
40 input "x,y";x,y
50 print usr(y*256+x)
60 goto 40