Using Assembly Language to write a short programcalled BEEP.COM
Question: How do we create a short COM prog to get or puter to standup and BEEP ?
How do we create a script in a batch file to run this BEEP.COM?
Let me see, If I start in MS-DOS mode and from C:\> type DEBUG. Fromthe command prompt ( hypen or minus sign ) type question mark ? to bring up DEBUG commands.
I'll need to use the following commands:
assemble A
dump D
go G
name N
proceed P
quit Q
register R
trace T
unassemble U
write W
First, what is at line 100h ?
I will type D 100 ( D 0100 )at the hyphen.
Well bippity-boo, look what is here ? -D 100166E:0100 BE BC DB 8B 74 09 03 C6-50 E8 0D FA 58 E8 5A 00 ....t...P...X.Z.166E:0110 03 F1 2B C6 8B C8 E8 7B-F4 83 F9 7F 34 00 5D 16 ..+....{....4.].166E:0120 00 F3 A4 B0 0D AA 47 EB-08 AC AA 3C 0D 74 02 EB ......G....<.t..166E:0130 F8 8B CF 81 E9 82 00 26-88 0E 80 00 C3 8B 1E 88 .......&........166E:0140 DE BE 10 D4 BA FF FF B8-00 AE CD 2F 3C 00 C3 A0 .........../<...166E:0150 D1 E2 0A C0 74 09 56 57-E8 2A 21 5F 5E 73 0A B9 ....t.VW.*!_^s..166E:0160 04 01 FC 56 57 F3 A4 5F-5E C3 50 56 33 C9 33 DB ...VW.._^.PV3.3.166E:0170 AC E8 5F 23 74 19 3C 0D-74 15 F6 C7 20 75 06 3A .._#t.<.t... u.:Let me try a few others to see what is in the box.
-D 9999
-D 0001
-D 0
-D 0000000 Oh! Oh!
What prog is there now ? -U 100166E:0100 BEBCDB MOV SI,DBBC166E:0103 8B7409 MOV SI,[SI-09]166E:0106 03C6 ADD AX,SI166E:0108 50 PUSH AX166E:0109 E80DFA CALL FB19166E:010C 58 POP AX166E:010D E85A00 CALL 016A166E:0110 03F1 ADD SI,CX166E:0112 2BC6 SUB AX,SI166E:0114 8BC8 MOV CX,AX166E:0116 E87BF4 CALL F594166E:0119 83F97F CMP CX,+7F166E:011C 3400 XOR AL,00166E:011E 5D POP BP166E:011F 16 PUSH SSWhat is the registry listing at 100h ?
-R
AX=0000 BX=0000 CX=0000 DX=0000 SP=FFEE BP=0000 SI=0000 DI=0000
DS=166E ES=166E SS=166E CS=166E IP=0100 NV UP EI PL NZ NA PO NC
166E:0100 BEBCDB MOV SI,DBBC
to be continued.....
regards,
How to get RobVG's puter to stand up and BEEP !
