Hello,
Some instructions make use of < > operators, I was told they are intended to ease selection of low or high order byte of an expression.
However, I get a " Syntax error in expression" error while assembling with pceas2.exe. Is it that usage of those operators is non standard and not supported by all assemblers?
Thanks a lot in helping me.
< > operators
Re: < > operators
I've never used that assembler, but I've come across this problem before on the 65816 assembler I use!
they are NOT supported by all assemblers, so you may need to come up with an alternative.
Getting the bottom byte can be done with and AND mask like & 255 (also the assembler may just skip the top byte if you try to load a 16 bit value into an 8 bit register)
Getting the top byte can be done by dividing / 256 or bitshifting >>8
You'll need to check the assembler documentation to see what is available, and do some testing!
they are NOT supported by all assemblers, so you may need to come up with an alternative.
Getting the bottom byte can be done with and AND mask like & 255 (also the assembler may just skip the top byte if you try to load a 16 bit value into an 8 bit register)
Getting the top byte can be done by dividing / 256 or bitshifting >>8
You'll need to check the assembler documentation to see what is available, and do some testing!
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter! // 「チビ悪魔」可笑しいゴシックSTG ! // Work in Progress: ChibiAliens
Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809
Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809
Re: < > operators
OK, thanks for your answer.
As per my understanding, they're not mandatory and can be easily overcome through the use of several alternatives.
As per my understanding, they're not mandatory and can be easily overcome through the use of several alternatives.