Sunday 29 March 2015

1. Display string "Aloha" and wait for user input and quit the program.

C:\Users\WIN7>debug
-a 100
1393:0100 db 'Aloha$'
1393:0106 mov ah, 09
1393:0108 mov dx, 100
1393:010B int 21
1393:010D mov ah, 01
1393:010F int 21
1393:0111 int 20
1393:0113
-rcx
CX 0000
:13
-n nanonano.com
-w
Writing 00013 bytes
-q

C:\Users\WIN7>nanonano.com
Aloha



01 --> Cares the key that pressed

08 --> Do not care about the key that pressed before quit.


2. Display two string "Aloha" and "Its good" without creating newline





3. Wait for user input ('Key' not 'String') dan melakukan condition jump
debug
-a 
138A:0100 jmp 135
db 'Are you cool ? [y/n] : $'
-a 135
jmp 150
138B:0137 db 'Lol u are a loosa!$'
138B:014A
-a 150
138B:0150 jmp 170
138B:0152 db 'yay, me too!$'
138B:015F
-a 170
138B:0170 jmp 210
138B:0173 db 0d, 0a, 'Press any key to continue. . . $'
138B:0195
-a 210
138B:0210 mov ah, 09
138B:0212 mov dx, 102
138B:0215 int 21
138B:0217 mov ah, 01
138B:0219 int 21
138B:021B cmp al, 79
138B:021D je 230
138B:021F jne 260
138B:0221
-a 230
138B:0230 mov ah, 09
138B:0232 mov dx, 152
138B:0235 int 21
138B:0237 mov ah, 09
138B:0239 mov dx, 173
138B:023C int 21
138B:023E int 20
138B:0240
-a 260
138B:0260 mov ah, 09
138B:0262 mov dx, 137
138B:0265 int 21
138B:0267 mov ah, 09
138B:0269 mov dx, 173
138B:026C int 21
138B:026E mov ah, 08
138B:0270 int 21
138B:0272 int 20
138B:0274
-rcx
CX 0000
:174
-n j3.com
-w
Writing 00174 bytes
-q

No comments:

Post a Comment