Newbie asm question

From: Johann Strauss (jhatapata_at_hotmail.com)
Date: 03/24/04


Date: Tue, 23 Mar 2004 21:39:46 -0500

Hello all,

I'm new to the whole assembly thing, having done other languages for many
years I decided I wanted to learn something with a bit more control, so to
speak.

I've been working on assembly for a little while with Motorola
microcontrollers without any real problems, yet I'm having some trouble
compiling on the x86 platform. I've downloaded the win32 port of nasm
(simply because I like it on my linux box) yet on either platform, I get
similar compile errors.

The code I'm trying is:
#make_COM#
ORG 100h

.model small
.stack
.data

Message db "hi$"
mov dx,OFFSET Message
mov ah,9
int 21h
mov ax,4c00h
int 21h
END start

I got the code from a tutorial (specifically Gavin's Guide to 80x86
Assembly) and when compiled, I get the errors:

prog.asm:1: label or instruction expected at start of line
prog.asm:4: parser: instruction expected
prog.asm:4: attempt to define a local label before any non-local label
prog.asm:5: attempt to define a local label before any non-local label
prog.asm:6: attempt to define a local label before any non-local label
prog.asm::10: comma or end of line expected
prog.asm::16 parser: instruction expected.

Needless to say, I'm confused. It won't compile with nasm or masm, but will
with the Emu8086 emulator, which seemed odd to me. Am I dealing with a bad
tutorial?

Any help would be appreciated, and if any of you have suggestions regarding
books, ebooks or tutorials that you feel would be helpful to a beginner
would be appreciated as well

Thanks



Relevant Pages

  • Re: Using a Combo Box to Find Records
    ... NameOfCombo, and the instruction "Replace NameOfCombo of your combo". ... This underlines the font in ExitLabel, which is presumably a label, probably ... A compile error contains some sort of description. ... Dim intOption As Integer ...
    (microsoft.public.access.forms)
  • Trustix 2.1 - kernel 2.2.26 compilation error ?
    ... Can someone explain it to me, what's wrong when making new kernel. ... kernel-source-2.4.26-3tr compile good, as usual. ... label at end of compound statement ...
    (comp.os.linux.misc)
  • Re: COBOL compiler written in COBOL
    ... A label had to start with a numeric character and be up to 16 characters ... Because UT06 source could be entirely free-form to allow it to ... You could of course make it look like COBOL if you want. ... Then at end of compile, ...
    (comp.lang.cobol)
  • Re: Odd behavior with odd code
    ... A label is not an object, and cannot have its address taken. ... You didn't compile with C, you compiled with gcc. ... For assistance with the C-like language implemented ...
    (comp.lang.c)
  • Re: Rid of Multi-Pass
    ... example (both conditional jumps finally go to the second ... label if I interpret your true local labels ... "true" local label it will assemble correct, ... Only in case of the way you implemented labels in your macros. ...
    (alt.lang.asm)