Huh? Why doesn't it work?

This is a discussion on Huh? Why doesn't it work? within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Code: .MODEL SMALL .STACK 200H .DATA Textstring db "Hmm...It just doesn't seem to work.$" .CODE START: Mov ax, SEG Textstring ...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,220

    Question Huh? Why doesn't it work?

    Code:
    .MODEL SMALL
    .STACK 200H
    .DATA
    Textstring db "Hmm...It just doesn't seem to work.$"
    .CODE
    START:
    
    Mov ax, SEG Textstring
    Mov ds, ax
    Mov dx, OFFSET Textstring
    Mov ah, 09
    Int 21h
    
    mov ah, 4ch
    mov al,00h
    int 21h
    
    END
    Won't compile, says: "Fatal: No Program entry point."

    I'm new to ASM, and it's really complicated [cool, huh?]

  2. #2
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,220
    Hehe, forgot the "START" after "END"

    Code:
    .MODEL SMALL
    .STACK 200H
    .DATA
    Textstring db "Hmm...It just seems to work.$"
    .CODE
    START:
    
    Mov ax, SEG Textstring
    Mov ds, ax
    Mov dx, OFFSET Textstring
    Mov ah, 09
    Int 21h
    
    mov ah, 4ch
    mov al,00h
    int 21h
    
    END START

  3. #3
    Normal vector Carlos's Avatar
    Join Date
    Sep 2001
    Location
    Budapest
    Posts
    463
    We'd need an "Assembly" room, too, isn't it?
    Btw, you'd try to optimize your code - it is the real spice of assembly.
    e.g.
    instead of
    mov al,00h -> xor al, al
    and so on.

    Have fun, ASM is the king!

  4. #4
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,220
    Yeah I don't understand any of it yet, I'm doing a few online tutorials whilst waiting for my book to arrive. (stupid amazon).


    I ordered this one: http://www.amazon.co.uk/exec/obidos/...372088-2641245

  5. #5
    31173 h4x0r gnu-ehacks's Avatar
    Join Date
    Nov 2001
    Posts
    556
    LoL, I live near S.F., and Amazon.com got me 2 books in about 2 days, and it was right around September 11th also...

    Pretty fast for me.
    What will people say if they hear that I'm a Jesus freak?
    What will people do if they find that it's true?
    I don't really care if they label me a Jesus freak, there is no disguising the truth!

    Jesus Freak, D.C. Talk

    -gnu-ehacks

  6. #6
    Normal vector Carlos's Avatar
    Join Date
    Sep 2001
    Location
    Budapest
    Posts
    463
    Try to find Peter Norton's book on ASM, I felt in love with Assembly while studying his book.
    He's got humour, style, and is a great teacher. He introduces you step by step in the world of assembly programming, while building a functional hex-editor.
    Last edited by Carlos; 02-20-2002 at 03:12 AM.

  7. #7
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,220
    Originally posted by Carlos
    Try to find Peter Norton's book on ASM, I felt in love with Assembly while studying his book.
    He's got humour, style, and is a great teacher. He introduces you step by step in the world of assembly programming, while building a functional hex-editor.
    Cool, what's the ISBN # ?

  8. #8
    back? dbaryl's Avatar
    Join Date
    Oct 2001
    Posts
    597

    ...is this it?

    http://shopping.yahoo.com/shop?d=b&id=2038464&cf=1

    "Peter Norton's Assembly Language Book for the IBM PC" by Peter Norton

    ISBN: 0136624537

    I just did a quick Google search for "Peter Norton assembly"... first match (I hope that's the right one =)
    This is my signature. Remind me to change it.

  9. #9
    Normal vector Carlos's Avatar
    Join Date
    Sep 2001
    Location
    Budapest
    Posts
    463
    I just can't recall, but searching... Will let you know.
    I've found two similar books on the net, but the one I was writing is building a hex-editor step by step.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. strcmp returning 1...
    By Axel in forum C Programming
    Replies: 12
    Last Post: 09-08-2006, 08:48 PM
  2. getline() don't want to work anymore...
    By mikahell in forum C++ Programming
    Replies: 7
    Last Post: 07-31-2006, 11:50 AM
  3. Why don't the tutorials on this site work on my computer?
    By jsrig88 in forum C++ Programming
    Replies: 3
    Last Post: 05-15-2006, 11:39 PM
  4. Problems in getting OpenGL to work
    By zonf in forum C Programming
    Replies: 5
    Last Post: 02-13-2006, 04:48 AM
  5. DLL __cdecl doesnt seem to work?
    By Xei in forum C++ Programming
    Replies: 6
    Last Post: 08-21-2002, 05:36 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21