mul120.asm
; z88dk / WebMSX
; z80asm -b -l mul120.asm
; appmake +msx -b mul120.bin --org=0xd000
org $d000
start:
push hl
pop ix
ld a, (ix+2)
ld h, a ; 256倍
add a, a
add a, a
add a, a
ld e, a ; 8倍
ld d, 0
xor a
srl h ; 256/2=128倍
rra
ld l, a
sbc hl, de ; 128-8=120倍
ld (ix+2), l
ld (ix+3), h
ret
mul120.bas
10 clear 100,&hcfff
20 defint a-z
30 def usr=&hd000
40 input "y(0~24)";y
50 print usr(y)
60 goto 40