flat assembler
Message board for the users of flat assembler.

Index > OS Construction > [MASM/TASM] Assembling GLaBIOS: error: unexpected characters

Author
Thread Post new topic Reply to topic
Fool-DupleX



Joined: 12 May 2024
Posts: 2
Fool-DupleX 12 May 2024, 10:56
Hello, I'm new here but have been using fasm for a while. I'm currently trying to assemble GLaBIOS with fasm and fasm displays a strange error, always at the same position in source code, whatever modification I do to it :

Code:
flat assembler  version 1.73.32  (1048576 kilobytes memory)
..\Harddisk\TASM\GLABIOS.ASM [9617]:
        ROR     BL, 1                                   ; move low bit into bit 5
error: unexpected characters.
    


Since it's always after 9616 lines, which is quite a lot, I was wondering if this could be related to a limitation of fasm ?

GLaBIOS can be found here : https://github.com/640-KB/GLaBIOS/tree/main/src

GLaBIOS is just one ASM file and assembles fine with MASM and TASM.
Post 12 May 2024, 10:56
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20132
Location: In your JS exploiting you and your system
revolution 12 May 2024, 11:10
fasm doesn't use the TASM or MASM macro format.

The problem is the rept
Code:
                REPT    3
        ROR     BL, 1                                   ; move low bit into bit 5
                ENDM    
fasm expects to see an opening curly bracket "{" after rept, instead it sees ROR.

And ENDM is not part of the fasm syntax.

You can do this instead.
Code:
rept 5 {
  ror bl,1
}    
Post 12 May 2024, 11:10
View user's profile Send private message Visit poster's website Reply with quote
Fool-DupleX



Joined: 12 May 2024
Posts: 2
Fool-DupleX 12 May 2024, 14:44
Oh nuts, I missed that one. Yes, you are totally right. Thank you and sorry for this mistake of mine. I juggle between several assemblers and tend to mix or forget the syntaxes.
Post 12 May 2024, 14:44
View user's profile Send private message Reply with quote
640KB



Joined: 09 Aug 2022
Posts: 1
640KB 16 May 2024, 14:40
Hey there. I've never actually tried building with TASM before, so it's great to hear it assembles fine. I just tried with TASM 2.5 and TASM 4.1 and for me it doesn't seem to like the HIGH OFFSET linker directive and the forward reference to the DNB MACRO in the VID_ATTR declaration. Admittedly the HIGH OFFSET is a bit of a stretch to use since it relies on the linker to handle it (not all versions do). I'll rewrite it to use a simpler assembler directive, which should be cleaner anyway (done Smile).

Curious - did you ever have any luck with fasm?

640KB
Post 16 May 2024, 14:40
View user's profile Send private message Visit poster's website 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.