flat assembler
Message board for the users of flat assembler.
Index
> Main > rcl Sanity check Required |
Author |
|
JohnFound 13 May 2011, 20:35
Of course, CF=1 after executing your example. The code generated from the above instructions is: $b0, $eb (mov al, $eb), $d0, $d0 (rcl al, 1)
The result logically is al=$d6 Check your source and use FASM only. Too many use of C really can harm your sanity. |
|||
13 May 2011, 20:35 |
|
Howesr1@yahoo.com 13 May 2011, 21:25
No c used here. I'm writing low level bios code and trying to print out the data while not stepping on it at the same time! Pushing and popping flags are interesting!
For some reason the code doesn't work al - eb rcl al,1 rcl bx,1 ... Should rotate the carry flag from ax to bx and it does not do that! The weird thing is when I print ax befoe th rcl al I get eb00 instead of 00eb How does this: rcl al affect all of ax? _________________ Bob's your uncle. Millie's your aunt. |
|||
13 May 2011, 21:25 |
|
ouadji 13 May 2011, 21:43
Code: ;no problem here ;debugger : Syser xor ebx,ebx clc ;-------------------------- mov al,0xEB ;result al = 0xEB - cy=0 rcl al,1 ;result al = 0xD6 - cy=1 rcl bx,1 ;result ebx = 0x00000001 - cy=0 Last edited by ouadji on 13 May 2011, 22:42; edited 1 time in total |
|||
13 May 2011, 21:43 |
|
LocoDelAssembly 13 May 2011, 22:22
To avoid the CLC you could use SHL the first time and RCL the second time.
|
|||
13 May 2011, 22:22 |
|
ouadji 13 May 2011, 22:41
my goal was to test the code proposed by "Howesr1", without change, and therefore without any optimization. That said, I'm agree with you. |
|||
13 May 2011, 22:41 |
|
JohnFound 14 May 2011, 05:09
Howesr1@yahoo.com, you better post some bigger part of your code. The problem is not in the particular instructions. What debugger you are using?
|
|||
14 May 2011, 05:09 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.