flat assembler
Message board for the users of flat assembler.

Index > Main > [solved: reserved word] Labels in FASM IDE

Author
Thread Post new topic Reply to topic
Bob201400



Joined: 11 Jan 2014
Posts: 1
Bob201400 11 Jan 2014, 21:33
I don't know if a similar thread was ever posted so I am hoping this is a first.

I am very new to assembly programming and struggling my way with it using FASM. I am using Fresh IDE v2.1.7 (the most current stable environment). I know some very basic commands and as a first project I am coding a bootloader for x86. I figured if I want to learn assembly I may as well get right into it Very Happy. Anyway my code works however I am fighting against labels and why they are being stubborn. Below is my code which I am playing with...

Code:
use16
      org 0x7c00
        ; ax bx cx dx -> 16bit general purpose registers
        ; mov ax, 0x12
        ; mov bx, ax
        ; mov cx, 0x1234 ; mov 16bit value 0x1234 into 16bit register cx
        ; mov dl, 0x12   ; mov 8bit value 0x12 into the low 8bit register dl of dx
        ; mov dh, 0x34

entry:

        mov ah, 0x0e     ; bios scrolling teletype
        mov al, [my_character1]

        int 0x10         ; cpu enters into an interrupt state, jumps to this interrupt handler in the IVT in memory setup by bios

        mov al, [my_character2]
        int 0x10

        my_character1:

                db 'X'

        my_character2:

                db 'Y'
        jmp $            ; endless jump
        times 510 - ($-$$)db 0
        dw 0xaa55 ;16bit word or 2 bytes - disc signature
    


I am only using one label 'entry' which throws an error when code is compiled. The error is 'reserved word used as symbol <<entry:>>'

If I remove it the code compiles successfully. Please help
Post 11 Jan 2014, 21:33
View user's profile Send private message Reply with quote
shutdownall



Joined: 02 Apr 2010
Posts: 517
Location: Munich
shutdownall 12 Jan 2014, 00:08
Just change the label name (!).
_entry, entry1, ntry or whatever is suitable.

Entry is a reserved word (directive) for FASM. Please read the documentation but the message is selfexplaining (use of reserved word as symbol).
A label is a symbol and "entry" is a reserved word.

Quote:
entry directive sets the entry point for MZ executable, it should be followed by the far address (name of segment, colon and the offset inside segment) of desired entry point.


http://flatassembler.net/docs.php?article=manual

(entry is used for MZ executable)
Post 12 Jan 2014, 00:08
View user's profile Send private message Send e-mail Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20445
Location: In your JS exploiting you and your system
revolution 12 Jan 2014, 00:48
Moving to "Main".
Post 12 Jan 2014, 00:48
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1905
DOS386 12 Jan 2014, 09:21
> I am very new to assembly programming and

Welcome Smile

> but the message is selfexplaining

This is not always true but this time FASM did a very good job Smile
Post 12 Jan 2014, 09:21
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.