Beruflich Dokumente
Kultur Dokumente
.DATA
TimePrompt DB 'Is it after 12 noon (y/n)?',13,10,':$'
GoodAfternoonMessage DB 13,10
DB 'Good afternoon, world!',13,10,'$'
GoodMorningMessage DB 13,10
DB 'Good morning, world!',13,10,'$'
1 הצג – אופן
MOV AH,9
MOV DX,OFFSET TimePrompt
INT 21h
2 הצג – אופן
MOV AH,9
LEA DX, TimePrompt
INT 21h
)(Getch
MOV AH,1
INT 21h
''9 ''8 ''7 ''6 ''5 ''4 ''3 ''2 ''1 ''0
h39 h38 h37 h36 h35 h34 h33 h32 h31 h30
0 h30 -h 30
1 h30 -h 31
5 h 30 -h 35
8 h 30 -h 38
9 h 30 -h 39
המשך-המרות
MOV AH,1 'דרך א
INT 21h
SUB AL,30h
data_not_ok:
סינון שגיאות
MOV AH,1
INT 21h
CMP ’AL,’0
צא למקום שגוי
CMP ’AL,’9
צא למקום שגוי
הגעת לכאן --משמע הקלט תקין
data_ok:
SUB ’AL,’0
.1היכן לשים את הטיפול בשגיאה
.2איך לדלג על הטיפול בנתונים תקינים
data_not_ok:
?האם
CMP AL,'y'
JE IsAfternoon
CMP AL,'Y‘
JE IsAfternoon
• MOV ResultStr[4],AL
• MOV ResultStr[12],DL
• MOV DX,OFFSET ResultStr
חיבור- פקודות נוספות
• ADD AX,Var1
• ADD Var1, AX
• ADD DL,'0‘
• INC AX