Home > other >  Why this DATA1DB 33 h, 39 h, h, 37 h is to define the decimal
Why this DATA1DB 33 h, 39 h, h, 37 h is to define the decimal

Time:09-22

The DATA SEGMENT
DATA1 DB 33 h, 39 h, h, h, 37, 34 h
DATA2 DB 36 h, 35 h, h, h, 32 h
DATA3 DB 5 DUP (?)
The DATA ENDS
CODE SEGMENT
ASSUME CS: CODE, DS: DATA
START: MOV AX, DATA
MOV DS, AX
CX, MOV 5
MOV SI, 0
CLC
NEXT: MOV AL, DATA1 [SI]
The ADC AL, DATA2 [SI]
AAA
MOV DATA3 [SI], AL
INC SI
LOOP NEXT
MOV SI, 5
DISP: ADD DATA3 [SI - 1), 30 h
MOV DL, DATA3] [SI - 1
MOV AH, 2
INT 21 h
DEC SI
JNZ DISP
MOV AH, 4 ch
INT 21 h
CODE ENDS
The END START

CodePudding user response:

Code from operation point of view, this is the right definition, all change to delete 3 or 3 to 0,
This should be expressed in a byte a data bit to multibit phase operation,

CodePudding user response:


Is this your DATA1, you may understand wrong, this DATA1 is 16 into the formulation of righteousness, followed by H are hexadecimal, you probably didn't see A ~ F,
Is it on the right of the decimal, said the Numbers 0 to 9 ASCII is (Numbers + 30) H, you can understand for the program in DATA1 defines a use ASCII representation of the array,
Principle is that you define DATA1 is DB class, with eight binary to represent a single character, namely 00 h ~ FFH

CodePudding user response:

Hey hey, thank you