1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MSX Z80で乗算

Last updated at Posted at 2018-08-04

参考
掛け算様々

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

mul.msxmul.basをWebMSXの[Drive A]の[+FILES]にドロップする。
WMSX Screen (1).png

1
0
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?