FAQ  •  Register  •  Login

BorIDE ASM compilation error

<<

oblo

Posts: 60

Joined: Tue Jul 12, 2011 5:23 pm

Post Sun Jul 31, 2011 2:00 am

BorIDE ASM compilation error

Hi all

I'm trying to compile a piece os ASM in BorIDE. The code is:

ASM
[2746 lines of ASM]
END ASM

When I try to compile it, I always have the same error (check image) The point is that no matter if I add or remove lines from the code, the error is always the same and always in the same line (1917) Anybody know if it's a bug? Maybe there are too many lines of code?

Thanks and regards

EDIT: the error is not generated by BorIDE but the zxb.exe compiler, sorry.
Attachments
Clipboard01.jpg
Clipboard01.jpg (33.45 KiB) Viewed 9362 times
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Sun Jul 31, 2011 3:13 am

Re: BorIDE ASM compilation error

Can you zip and attach the code either to this thread or in a private message?
<<

oblo

Posts: 60

Joined: Tue Jul 12, 2011 5:23 pm

Post Sun Jul 31, 2011 7:51 am

Re: BorIDE ASM compilation error

Of course, here is.

Cheers
Attachments
ocman_asm.zip
(11 KiB) Downloaded 333 times
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Sun Jul 31, 2011 9:21 am

Re: BorIDE ASM compilation error

oblo wrote:Of course, here is.
Cheers

Your attachtment has a BOM (Byte Order Mark) for Unicode UTF-16, but appears to be encoded in an different encoding.
First two bytes of text are 0xFEFF which are cofusing the compiler. Also some chars are "dirty" or misencoded. Which encoding did you use?
Please use UTF-8 whenever possible. :!:

Update: your BOM is OK (UTF-8), but zxb does not understand BOMs (a 2-3 bytes at the beginning of the text file). Once removed I recompiled your program and got your error. The real error line is not at line 1917 but at 2662 (this is something I have to investigate further). Anyway, the syntax:
  Code:
DEFB 5,0,5,0
DEFB 179,"cor","e"+$80

is not allowed. At the moment you cannot mix strings and bytes in the same DEFB line. I'm going to add this feature to the assembler.
Meanwhile you can workaround this rewriting the above line as:
  Code:
DEFB 5,0,5,0
DEFB 179
DEFB "cor"
DEFB 'e'+$80

Note the last line: The assembler makes distinction between strings (double quotes " "), and char (single quotes ' '). A char is a byte written as an ASCII char, and can be added a number (+$80). A string cannot. So "e" + $80 is not legal, but 'e' + $80 is.
<<

oblo

Posts: 60

Joined: Tue Jul 12, 2011 5:23 pm

Post Sun Jul 31, 2011 10:13 am

Re: BorIDE ASM compilation error

Thanks for your quick response :) I'll make those changes and will try. Besides, this is my first 'serious' ASM code, so it's possible that it contains errors :-/

Cheers

Edit: after I made the changes, that error is solved but now I'm receiveing another one (Unexpected end of line [NEWLINE]) that is reported at bug-reports/topic499.html. Must I remove all blank lines?
Edit2: after close BorIDE and reload the project again, now I'm getting a different erro (12:48:34 -> temp.bor:1931: Error: Syntax error. Unexpected token '111' [INTEGER]. Compilation failed)
It seems the code need more debug than I thought at first :(

Cheers

Return to ZX Basic Compiler

Who is online

Users browsing this forum: No registered users and 3 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.

phpBB SEO