New answers tagged

1 vote

What does an ADC (add with carry) instruction following ADD do?

add ax, 0FFFCh adc dx, 0FFFFh ; <-- here add ax,0FFFCh --> Adds ax and FFFC, if ax is at least 4 to start with it will cause an overflow and set the carry flag. adc dx, 0FFFFh --> ...
Jason Goemaat's user avatar
20 votes

What does an ADC (add with carry) instruction following ADD do?

As others have explained, ADC adds its two operands and the carry bit, storing the result in the first operand. Like ADD, it sets the carry bit as appropriate: adding two n-bit values produces a (n+1)-...
Stephen Kitt's user avatar
7 votes

Why does this code trigger a TRAP on a PDP11/70?

It's a move to the I-space in the previous mode, in this case user mode. From the processor handbook: The address of the destination operand is determined in the current address space. MTPI then ...
dave's user avatar
  • 35.6k
0 votes

Why is memory below the stack pointer constantly being overwritten under a debug session?

According to the comment I recreated the same program by copying the source from page 243 of the PDF of Assembly Language Step by Step: MyStack SEGMENT STACK db 64 dup ('STACK!!!') MyStack ENDS ...
ecm's user avatar
  • 963
9 votes

How to use external asm function in "vscode-amiga-debug" cross compiler?

There are two caveats involved when mixing C and assembly: You must tell the assembler that a symbol is meant to be externally visible (so that the linker can see it). With vasm, there are several ...
tofro's user avatar
  • 35k

Top 50 recent answers are included