flat assembler
Message board for the users of flat assembler.
Index
> Main > flags, cmp, and add... |
Author |
|
coconut 12 Nov 2006, 04:26
zero flag for example works like so
cmp eax,ecx ;zero flag will be set to 0 if equal jnz some_label ;if not equal jump somewhere else call some_thing ;code continues here if equal ive never played with carry flag, here is some info on it: http://en.wikipedia.org/wiki/Carry_flag |
|||
12 Nov 2006, 04:26 |
|
rugxulo 12 Nov 2006, 05:57
Here's how you add two 32-bit numbers (using 16-bit assembly). Double-check your result in CALC.EXE, if you want.
Code: [ WinXP ] Sat 11/11/2006>type test.asm org 100h mov ax,5150h mov bx,0FFEEh mov cx,1000h mov dx,2000h add bx,dx adc ax,cx int3 int 20h [ WinXP ] Sat 11/11/2006>fasm test.asm flat assembler version 1.67.14 (455416 kilobytes memory) 1 passes, 19 bytes. [ WinXP ] Sat 11/11/2006>debug test.com -g AX=6151 BX=1FEE CX=1000 DX=2000 SP=FFFE BP=0000 SI=0000 DI=0000 DS=14F6 ES=14F6 SS=14F6 CS=14F6 IP=0110 NV UP EI PL NZ NA PO NC 14F6:0110 CC INT 3 -q [ WinXP ] Sat 11/11/2006>scrndump EDIT: I know, I know, I should've just used ADD reg16, imm16. |
|||
12 Nov 2006, 05:57 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.