Re: debug and the newbe




"SpooK" <keith@xxxxxxxxxxx> a écrit dans le message de news:
1188322687.526706.115190@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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.

for sure this worked. Does it means I should use nasm already?
What is the meaning of 4C00 ?


But I was trying debug . . .
-a 100
0D65:0100 mov ax,9
0D65:0103 mov ax,120
0D65:0106 int 21
0D65:0108 mov ax, 4c00
0D65:010B int 21
0D65:010D int 20
f 010d 0119 90
-e 120 "Allo$"
-a 128
0D65:0120 jnz 108
0D65:0126 int 20
f 0126 0130 90

n huh.com
r ax:
60
w


.



Relevant Pages

  • Re: newbie questions
    ... MOV AH,4EH; ... instruction operands must be the same size" this error is in line " INT 21H", because it points everything whats after mov dx, offset mask. ... X86 addresses *always* involve a segment register, ... The examples in your book will need some alteration to work with Nasm. ...
    (alt.lang.asm)
  • Re: questions from a newbie
    ... Nobody has given me reasons to use as, nasm, or others and why. ... O_DIRECTORY equ 00200000Q ... mov ebx,texmfdir ... int 80h ...
    (alt.lang.asm)
  • Re: CSpinButtonCtrl, CTabCtrl transparent oder im Edelstahllook ?
    ... einen Transparent Blit, kann mit der GDI nur über umwegen erreichen, ... TransparentBlt(HDC hdcDest, int nXDest, int nYDest, int nWidth, ... mov edi, CDraw.m_pTmp ...
    (microsoft.public.de.vc)
  • [NT] Multiple Windows XP Kernel Vulnerability Allow User Mode Programs To Gain Kernel Privileges
    ... Kernel Privileges ... entry with a pointer to your code and execute an INT n instruction. ... DWORD NotUsed; // Never accessed by the kernel ... mov ecx,esp ...
    (Securiteam)
  • Re: Disassembler questions
    ... I have been recently trying to see how some simple c programs translate ... int main{ ... mov edx,len ... nasm is adding padding to the end of the section. ...
    (comp.lang.asm.x86)