flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 01 Sep 2020, 08:04
You are correct. There are no native 8-bit ARM rotates with carry (RCL equivalent, which makes it a 9-bit shift actually).
If you need an exact equivalent then you have to manually construct it. You can rotate left by rotating right the inverse amount with ROR. The most troubling part will be to reduce the shift modulo 9 (not 8) unless you know your shift value is already <9. |
|||
![]() |
|
Kuemmel 01 Sep 2020, 08:14
Ok! Meanwhile I got the idea to check the source of DOSBox...that acutally looks troublesome in the sense of sizecoding
![]() Code: #define RCLB(op1,op2,load,save) if (op2%9) { LoadZF;LoadSF;LoadAF; Bit8u cf=get_CF(); flags.var1.b=load(op1); flags.var2.b=op2%9; flags.type=t_RCLb; flags.result.b=(flags.var1.b << flags.var2.b) | (cf << (flags.var2.b-1)) | (flags.var1.b >> (9-flags.var2.b)); SETFLAGBIT(CF,((flags.var1.b >> (8-flags.var2.b)) & 1)); SETFLAGBIT(OF,(flags.var1.b ^ flags.result.b) & 0x80); save(op1,flags.result.b); } |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.