Re: debug and the newbe
- From: SpooK <keith@xxxxxxxxxxx>
- Date: Tue, 28 Aug 2007 10:38:07 -0700
On Aug 28, 12:29 pm, "Jean Pierre Daviau" <O...@xxxxxxxxxx> wrote:
Hi everybody,
Please tell me whats wrong with that small dot com
----
-a 100
0DF1:0100 mov ah,09
0DF1:0102 mov dx, 107
0DF1:0105 int 21
0DF1:0107 "Allo"
Using that Interrupt function requires the string to be terminated
with $. Also, it looks like your program will crash since there is no
means to exit the program and the program flows directly into the
data. Here is a more appropriate example, written in NASM.
ORG 0x100
[BITS 16]
;Print the String
mov ah,9
mov dx,MSG
int 0x21
;Exit to DOS
mov ax,0x4C00
int 0x21
;The Message to Print
MSG DB 'Allo$'
Assemble this example with NASM using the flat binary format (-f bin)
and make sure it assembled file has the .com extension.
.
- Follow-Ups:
- Re: debug and the newbe
- From: Jean Pierre Daviau
- Re: debug and the newbe
- References:
- debug and the newbe
- From: Jean Pierre Daviau
- debug and the newbe
- Prev by Date: Re: ELF loading
- Next by Date: Re: ELF loading
- Previous by thread: Re: debug and the newbe
- Next by thread: Re: debug and the newbe
- Index(es):
Relevant Pages
|