Home > other >  Assembly language
Assembly language

Time:10-07

Be urgent!!!!!!

CodePudding user response:

A b d s four word unit memory address did not say... . ??

CodePudding user response:

reference 1st floor weixin_40063798 response:
a b d s four word unit memory address did not say... . ?

Subject is such that the address should be random, strives for the big help, I can enter a word input

CodePudding user response:

Don't know right, literally written,
Mov ax, A
CMP ax, 0
Je s
Mov ax, B
CMP ax, 0
Je s
Mov ax, D
CMP ax, 0
Je s
The add ax A
The add ax, B
Mov S, ax
JMP short ok
S: mov word PTR A, 0
Mov word PTR B, 0
Mov word PTR D, 0
Ok: mov ax, 4 c00h
Int 21 h

CodePudding user response:

Bosses, how to define in the beginning, can all points

CodePudding user response:

reference weixin_40063798 reply: 3/f
don't know right, literally written,
Mov ax, A
CMP ax, 0
Je s
Mov ax, B
CMP ax, 0
Je s
Mov ax, D
CMP ax, 0
Je s
The add ax A
The add ax, B
Mov S, ax
JMP short ok
S: mov word PTR A, 0
Mov word PTR B, 0
Mov word PTR D, 0
Ok: mov ax, 4 c00h
21 h int

Because I write is similar, but can only enter a number

CodePudding user response:


8086
.The model small

.data
A dw 1
Dw 2 b
Dw 3 d
S dw?

The code
Start:
Mov ax, a
Mov bx, b
Mov dx, d
The test ax, ax
Jz @ @ 1
The test bx, bx
Jz @ @ 1
The test dx, dx
Jz @ @ 1
The add ax, bx
The add ax, dx
Mov s, ax
JMP @ @ 2
@ @ 1: xor ax, ax
A, mov ax
Mov b, ax
Mov d, ax
@ @ 2:
Mov ah, 4 ch
Int 21 h

The end start
  • Related