Home > other >  A great god help look at x86 assembly language the results of debugging and running results is not t
A great god help look at x86 assembly language the results of debugging and running results is not t

Time:09-20

Assume cs: codesg; Linear congruence algorithm randomly generated three elements

Codesg segment

Output:; Will a number according to the decimal output
Mov bx, 10
Cx, mov 0
Disp1:
Mov dx, 0
Div bx
Push dx
Cx
inc.The or ax, ax
Developed disp1
Disp2:
Mov ah, 2
Pop dx
The add dl, 30 h
Int 21 h
Loop disp2
JMP goon

Start:
Mov ax, data
Mov ds, ax
Mov ax, stack
Mov ss, ax

Mov al, 1
Mov bl, 11
Mov bh, 101
Cx, mov 3;
Mov di, 0

S: the mul bl
The add ax, 7
Div bh
Mov al, ah
Mov dl, al
Push ax
Mov ax, dx
Push bx
Push cx
Push dx
JMP output
Goon:
Mov dl, '
Mov ah, 2
Int 21 h
Pop dx
Pop cx
Pop bx
Pop ax
Mov ah, 0
Loop s

Mov ax, 4 c00h
Int 21 h

Codesg ends
End the start

CodePudding user response:

Output: the back of the div bx is dx: ax/bx even with dx but haven't set 0, it DOS loader is regardless of dx, and debug software tends to zero, it so both sides can have different results, leave on their own dx is zero,

CodePudding user response:

In addition, this program structure on the process you are like some

CodePudding user response:

reference 1/f, zara's reply:
output: the back of the div bx is dx: ax/bx even with dx but haven't set 0, it DOS loader is regardless of dx, and debug software tends to zero, it so both sides can have different results, leave on their own dx is 0,
thank you, is too strong, I was in the change

CodePudding user response:

You tell me the x86 is this? Clearly this is a 16-bit assembly

CodePudding user response:

reference 4 floor sbc0519 response:
you tell me the x86 is this? Clearly this is a 16-bit assembly
I can not express how accurate

CodePudding user response:

reference 4 floor sbc0519 response:
you tell me the x86 is this? Clearly this is a 16-bit assembly
I express is not accurate

CodePudding user response:

X86 loosely, broadly refers to all 8086/8088 compatible processors, including 16/32/64 - bit processors, in a narrow sense only includes 16/32, not including 64, 64 using x64 and x86-64, intel64, AMD64 terms like
  • Related