EdouardBERGE / rasm

RASM powerful Z80 assembler
129 stars 16 forks source link

Not adding a final new line at the end of an included file may prevent compilation #27

Closed anrikun closed 2 years ago

anrikun commented 2 years ago

In my main file main.asm, I include a file: include "macros.asm"

The macros.asm file itself includes other files:

include "macros/video.asm"
include "macros/sound.asm"

If I don't add a new line at the end of the macros.asm file, compilation fails:

Pre-processing [./src/main.asm]
Error: [.\src\macros.asm:2] invalid char ';' (59) char 1
EdouardBERGE commented 2 years ago

i cannot reproduce the bug, do you use windows or linux? (or...)

(i tried Linux)

anrikun commented 2 years ago

I'm using Windows.

EdouardBERGE commented 2 years ago

Hi, i tried with 3 files and windows 64 bits exec, each of them without final CR, i did not reproduce the bug, can you send me a proper test-case?

anrikun commented 2 years ago

Sorry for the late answer. For some reason I wasn't notified of your update. macro1.txt macro2.txt main2.txt Try these 3 files (change .txt to .asm) and compile main2.asm

Pre-processing [./src/main2.asm]
Error: [.\src\macro1.asm:1] invalid char ';' (59) char 1
EdouardBERGE commented 2 years ago

fixed with last commit https://github.com/EdouardBERGE/rasm/commit/97ac8fd5eed04542b262c26db2f86ad7fc6f5a3b