flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2 |
Author |
|
revolution 29 Jan 2010, 06:49
LocoDelAssembly wrote:
LocoDelAssembly wrote: So, would you expect that "RET -4" subtracts four from ESP in 32-bit mode instead of adding 65532? |
|||
![]() |
|
hopcode 29 Jan 2010, 10:52
You are missing the whole point
(and this is my last post on this blogging thread): if you write: RET -4 fasm compiles good,but that is probably an user coding error if fasm receives RET -4 from a frontend, fasm compiles it good,but that is probably a frontend coding error if you find C2FCFF from fasm output, that is probably an user/frontend coding error All these encodings are allowed on intel cpu and by fasm. other instruction other output, and we could discuss for two years without finding/proposing a solution. For example BT and the clear statement on Intel docs: Quote: Some assemblers support immediate bit offsets larger than 31 by using the immediate Can you read the last sentence ? Do you understand the point ? There is a reason because fasm/processor allows you to encode Code: MOV CL,233 ;or RET -4 It is to say, coehrence is the matter. I have myself asked for the MONITOR instruction not long ago. What fasm accepts in the source is the double form implicit/explicit. It is to say, the matter is not about coding errors. It is about avoiding to use of a new directive in the source code (like for example could be a "strict") just alike for the MONITOR instruction: 2 uses 1 encoding and so for the MOV CL,233, RET/ENTER etc. Or should we state that because of the 2 uses fasm doesnt accomplish the WYSIWYG feature ? Or pehraps instead of writing MOV CL,233 you would prefer MOV CL,-23 ![]() Bye Bye hopcode . . . |
|||
![]() |
|
revolution 29 Jan 2010, 11:03
hopcode: Just because the Intel manual says imm8 is signed does not mean that "mov cl,233" should be wrong. The manual is not god or perfect or anything like that. Bytes can be interpreted as signed or unsigned, this is normal. fasm allows both signed and unsigned values to be entered.
What happens here? Code: mov cl,127 add cl,1 ;OMG, the CPU will explode, 128 cannot be encoded!!!!!!! |
|||
![]() |
|
Plue 29 Jan 2010, 11:49
Borsuc wrote:
_________________ Roses are red Violets are blue Some poems rhyme And some don't. |
|||
![]() |
|
Borsuc 29 Jan 2010, 19:25
@Plue, sorry I probably skipped it.
![]() |
|||
![]() |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.