signed-overflow Questions
1
Solved
I am designing a 16 bit ALU in verilog based on an existing RISC ISA. The ISA says that the carry flag is set when the operation is unsigned, and overflow is set when the operation is signed. The i...
Jackqueline asked 9/9, 2021 at 21:23
2
Solved
Consider a typical absolute value function (where for the sake of argument the integral type of maximum size is long):
unsigned long abs(long input);
A naive implementation of this might look so...
Elyseelysee asked 26/6, 2013 at 7:3
2
Solved
I have gotten round to implementing the ADD A,r set of opcodes on my Z80 core. I had a bit of confusion about the carry and overflow flags which I think I've nailed, but I wanted to put it to the c...
Delubrum asked 7/11, 2011 at 9:16
3
.data
val1 BYTE 10h
val2 WORD 8000h
val3 DWORD 0FFFFh
val4 WORD 7FFFh
If val2 is incremented by 1 using the ADD instruction, what will be the values of the Carry
and Sign flags?
If val4 is incr...
Kopeck asked 2/6, 2014 at 8:16
2
Solved
I have the next code:
mov al, -5
add al, 132
add al, 1
As I check it, the overflow flag and the carry flag will set in the first operation, and in the second, only the overflow will set.
But I...
Baldric asked 13/12, 2011 at 21:8
1
Solved
I've been playing with assembly for a while and looking at some code.
in which AL is first set to 0x84 then cmp AL, 0x30 is used.
This instruction then triggers the Overflow flag.
From what I read...
Timbered asked 31/8, 2011 at 18:19
1
© 2022 - 2024 — McMap. All rights reserved.