flat assembler
Message board for the users of flat assembler.
Index
> Main > Can't assemble certain "hybrid" instructions! |
Author |
|
vbVeryBeginner 28 Apr 2006, 08:45
i tried,
Code: cmp byte [0100h],1 and i got 80 3E 00 01 01 --- CMP BYTE PTR [0100],01 in debug. |
|||
28 Apr 2006, 08:45 |
|
LocoDelAssembly 28 Apr 2006, 10:39
vbVeryBeginner, but that is not the same, you are comparing just one byte against 1 instead of a word against 1.
Anyway with "cmp word [0100h], 1" I get 83 3E 00 01 01 CMP WORD PTR [0100],+01 I'm using FASM 1.65.21 |
|||
28 Apr 2006, 10:39 |
|
Tomasz Grysztar 28 Apr 2006, 13:44
Yes, "cmp word [0100h],1" makes:
83 3E 00 01 01 unlike what Cas wrote. And it's "cmp word [0100h],word 1" that makes: 81 3e 00 01 01 00 |
|||
28 Apr 2006, 13:44 |
|
Cas 29 Apr 2006, 04:00
You're right. I'm using an older version of FASM! I'll try the new one
Anyway, now that I'm here, let me give you a different example: what about: add sp,+1 where +1 is stored as a byte in DEBUG? I have not tested this one in FASM, but I expect the same as with the other one. I am going to test both with the new one. If it works fine with FASM 1.65.21, please ignore my post. I appreciate you help very much, guys. |
|||
29 Apr 2006, 04:00 |
|
Tomasz Grysztar 29 Apr 2006, 08:59
Even with older versions of fasm it was exactly the same way - you must have done something wrong if you've got different result.
The "add sp,1" makes shorter form, while "add sp,word 1" forces the longer one. See fasm's manual, section 1.2.6. |
|||
29 Apr 2006, 08:59 |
|
Cas 04 May 2006, 05:22
You're right. I've found what I did wrong.Sorry for the false alarm, and thank you so much for your assistance!
|
|||
04 May 2006, 05:22 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.