problems with the debug do you step by step....

Started by fernando, May 21, 2005, 08:37:07 PM

Previous topic - Next topic

fernando

thanks for you attention aeroasm

but write step by step desde el debug

show
ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqrstuvwxyz

c:\>debug
-a 100
####:0100    ?
####:0103    ?
####:0100   
####:0100
####:0100
####:0100

-g
ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890abcdefghijklmnopqrstuvwxyz

please

MichaelW

Hi fernando,

You should first read and understand this topic:

http://www.masmforum.com/simple/index.php?topic=1295.0

Here is a commented version of the code you posted in your first topic:

; From Ralf Brown's Interrupt List:
;
; INT 21 - DOS 1+ - WRITE CHARACTER TO STANDARD OUTPUT
;   AH = 02h
;   DL = character to write
; INT 20 - DOS 1+ - TERMINATE PROGRAM
;   CS = PSP segment
;
; For DEBUG, all numbers are hexadecimal.
;
; This code will display the byte values 0-255 as ASCII.
;
####:0100 mov cx,100 ; Set the loop counter to 256
####:0103 mov dl,0   ; Set DL to the starting byte value
####:0105 mov ah,2   ; Set AH to the function number
####:0107 int 21     ; Call the function
####:0109 inc dl     ; Increment the byte value
####:010B loop 105   ; Repeat 0105 to 0109 until CX = 0
####:010D int 20     ; Terminate
####:010F


The lower 32 ASCII values include control codes that will affect how the characters are displayed. The problem codes are 8 (backspace), 9 (tab), 10 (linefeed), and 13 (carriage return).

To display the sequence as shown you would need to display three sequences starting each at a different ASCII value, and then add an additional "0" to the numeric sequence. Here is a table of the lower 128 ASCII codes (with the codes in decimal, you will need to convert them to hexadecimal for use with DEBUG):

000   (nul)  016 ► (dle)  032 sp  048 0  064 @  080 P  096 `  112 p
001 ☺ (soh)  017 ◄ (dc1)  033 !   049 1  065 A  081 Q  097 a  113 q
002 ☻ (stx)  018 ↕ (dc2)  034 "   050 2  066 B  082 R  098 b  114 r
003 ♥ (etx)  019 ‼ (dc3)  035 #   051 3  067 C  083 S  099 c  115 s
004 ♦ (eot)  020   (dc4)  036 $   052 4  068 D  084 T  100 d  116 t
005 ♣ (enq)  021 § (nak)  037 %   053 5  069 E  085 U  101 e  117 u
006 ♠ (ack)  022 ▬ (syn)  038 &   054 6  070 F  086 V  102 f  118 v
007 • (bel)  023 ↨ (etb)  039 '   055 7  071 G  087 W  103 g  119 w
008 ◘ (bs)   024 ↑ (can)  040 (   056 8  072 H  088 X  104 h  120 x
009   (tab)  025 ↓ (em)   041 )   057 9  073 I  089 Y  105 i  121 y
010   (lf)   026   (eof)  042 *   058 :  074 J  090 Z  106 j  122 z
011 ♂ (vt)   027 ← (esc)  043 +   059 ;  075 K  091 [  107 k  123 {
012 ♀ (np)   028 ∟ (fs)   044 ,   060 <  076 L  092 \  108 l  124 |
013   (cr)   029 ↔ (gs)   045 -   061 =  077 M  093 ]  109 m  125 }
014 ♫ (so)   030 ▲ (rs)   046 .   062 >  078 N  094 ^  110 n  126 ~
015 ☼ (si)   031 ▼ (us)   047 /   063 ?  079 O  095 _  111 o  127 ⌂


The only speaker sound you can make with a DOS or BIOS interrupt is a standard BIOS "beep", which has a fixed frequency (pitch) and a duration of approximately 0.5 second. You do it by writing ASCII character 7 to the display.

You can find information on the DOS (and BIOS) interrupts in Ralf Brown's Interrupt list.

An HTML version is here:

http://www.ctyme.com/rbrown.htm

And the download version here:

http://www-2.cs.cmu.edu/~ralf/files.html
eschew obfuscation

AeroASM

Quote from: fernando on May 21, 2005, 08:37:07 PM
thanks for you attention aeroasm

but write step by step desde el debug

It is better if you work it out yourself. If you try, then you learn. THen if you have problem, then we will help you.

pbrennick

fernando,
Why don't you post what code you have written so far.  That way, we can see if you are going in the right direction.  Be sure to look at the link posted by Michael, also.

Also, please stop opening new topics dealing with the same subject matter.  :wink

Paul