R800 multiply instruction

Page 1/3
| 2 | 3

By MicroTech

Champion (388)

MicroTech's picture

11-02-2004, 11:02

Hi MSX users,
I'm trying to write an MSX Turbo R program which take advantage of R800 multiply instructions but the only instructions useful seems to be MUL HL,BC (I didn't try MUL HL,SP).
Actually I haven't a real Turbo R to try, I use RuMsx so I can't understand if it's an emulator problem or a real R800 problem.
Thanks in advance for your attention Wink

Login or register to post comments

By BiFi

Enlighted (4348)

BiFi's picture

11-02-2004, 11:56

The R800 has two types of multiplication instructions: MULUB and MULUW. For MULUW there are:

  • MULUW HL,BC
    MULUW HL,SP

with the result in DEHL. For MULUB there are:

  • MULUB A,B
    MULUB A,C
    MULUB A,D
    MULUB A,E

with the result in HL. There are some multiplication instructions which might be valid, though the result might be faulty:

  • MULUW HL,DE
    MULUW HL,HL
    MULUB A,H
    MULUB A,L
    MULUB A,A

RuMSX isn't updated that regularly. You might want to check out either NLMSX or openMSX which both have R800 emulation as well... For pro's, con's and features check the MSX Emulator Comparison.

By MicroTech

Champion (388)

MicroTech's picture

11-02-2004, 15:51

Thank you!
These infos are very useful to me.
Smile

By anonymous

incognito ergo sum (116)

anonymous's picture

11-02-2004, 17:03

I just don't get it that an emulator that's so old and so buggy is this popular!?! Question oO

By BiFi

Enlighted (4348)

BiFi's picture

11-02-2004, 19:04

I think many people still think RuMSX is the only emulator with turboR emulation, but in fact there are 3 more...

By legacy

Hero (570)

legacy's picture

11-02-2004, 19:37

I just don't get it that an emulator that's so old and so buggy is this popular!?! Question oO

Maybe the real disk access?? . because this is the only one
In case i need real diskaccess i use RUMSX as well.

By mars2000you

Enlighted (6428)

mars2000you's picture

11-02-2004, 19:56

You have also real disk access in the newest version of paraMSX (0.44 beta) and paraMSX is really better than RuMSX, although it doesn't support Turbo-R ....

By Edevaldo

Master (154)

Edevaldo's picture

04-10-2017, 19:30

Any information on how the multiplications instructions affect the flags?

By Edevaldo

Master (154)

Edevaldo's picture

04-10-2017, 19:55

On the http://www.z80.info website I found the description of the flags states. Both instructions have the same behavior:

s <- 0
Z <- *
. <- ?
H <- .
P <- 0
. <= ?
N <- .
C <- *

"." means unchanged. I guess "?" is not known/not documented or undefined. "*" is data dependent but I'm not sure what this would mean for the C flag as those are unsigned multiplications and also cannot overflow, I would expect C to be 0.

By KdL

Paragon (1450)

KdL's picture

05-10-2017, 00:02

openMSX says:

 [..]
 4347 // MULUB A,r
 [..] 
 4350         // Verified on real R800:
 4351         //   YHXN flags are unchanged
 4352         //   SV   flags are reset
 4353         //   Z    flag is set when result is zero
 4354         //   C    flag is set when result doesn't fit in 8-bit
 [..]
 4363 // MULUW HL,ss
 [..]
 4366         // Verified on real R800:
 4367         //   YHXN flags are unchanged
 4368         //   SV   flags are reset
 4369         //   Z    flag is set when result is zero
 4370         //   C    flag is set when result doesn't fit in 16-bit
 [..]

By Grauw

Ascended (10699)

Grauw's picture

05-10-2017, 00:12

Oh, good to know, that C flag value is pretty handy…

Page 1/3
| 2 | 3