MIRROR and MUL spelling

Do you live and breathe hexadecimal? Do you like speaking to hardware directly?

Moderator: Programming Moderators

User avatar
Mmattsteel
Posts: 9
Joined: Wed May 31, 2017 5:38 am
Location: Venice Italy
Contact:

MIRROR and MUL spelling

Postby Mmattsteel » Wed Jun 03, 2020 9:14 pm

Hi,
I have a question about the spelling of the new Z80N assembler mnemonics MIRROR A and MUL.
Since A is implicit in MIRROR A instruction, the same way as the old DAA or the new SWAPNIB, wouldn't we spell it simply MIRROR ?
And since MUL acts on D and E, wouldn't we spell it as MUL D,E or MUL DE ? I'm asking that to understand the ratio in this choice. 😁

Thank you.
_Matteo.
Matteo.
Backer #1227. ZX Spectrum+ m/c programmer since 1985.
Take a look to https://github.com/mattsteeldue/vforth-next

User avatar
Mmattsteel
Posts: 9
Joined: Wed May 31, 2017 5:38 am
Location: Venice Italy
Contact:

Re: MIRROR and MUL spelling

Postby Mmattsteel » Wed Jun 03, 2020 9:31 pm

Jim Bagley just replyed me on FB about the first question: "It was MIRROR A because we were considering a MIRROR DE also".
Thank you Jim.
Matteo.
Backer #1227. ZX Spectrum+ m/c programmer since 1985.
Take a look to https://github.com/mattsteeldue/vforth-next

seedy1812
Posts: 91
Joined: Tue May 30, 2017 11:31 am

Re: MIRROR and MUL spelling

Postby seedy1812 » Thu Jun 04, 2020 9:11 pm

If you saw MUL DE , could you also do MUL HL or MUL BC. ?
If you saw MUL D,E could you change the registers and get a MUL H,B ?

Why since CPL only works on A is it not CPL A
Why ADD A,B but SUB B

Who knows and who cares. It is what it is and us mere mortals have to follow the rules

User avatar
varmfskii
Posts: 287
Joined: Fri Jun 23, 2017 1:13 pm
Location: Stone Mountain, GA USA

Re: MIRROR and MUL spelling

Postby varmfskii » Thu Jun 04, 2020 10:42 pm

Many assemblers accept alternate forms like CPL A. Personally, coming from another architecture that has very very few instructions with implied operands (it does have MUL for D<-A*B), I don't like implied operands.
Backer #2741 - TS2068, Byte, ZX Evolution

User avatar
sol_hsa
Posts: 273
Joined: Fri Jun 02, 2017 10:10 am
Location: Finland
Contact:

Re: MIRROR and MUL spelling

Postby sol_hsa » Fri Jun 05, 2020 3:29 am

It's also possible that an assembler supports pseudo-operations, where you type mul h,l but the assembler emits ops that swap de and hl, mul and then swap back.

Cthutu
Posts: 14
Joined: Tue Jun 13, 2017 12:30 pm

Re: MIRROR and MUL spelling

Postby Cthutu » Sun Aug 16, 2020 7:05 pm

Odin will support MIRROR, MIRROR A, MIRR and MIRR A. It will support MUL, MUL DE and MUL D,E too.


Who is online

Users browsing this forum: No registered users and 3 guests