Sjasm conditional assembly

By Juan Luis

Resident (46)

Аватар пользователя Juan Luis

12-08-2019, 00:59

I'm trying to convert my old assembly code from Pasmo to Sjasm, but there are somethings I can't understand. I'm trying to avoid multiple include of a file like in C, defining labels, but it doesn't work.
-----------------------
; msx-bios.inc file
ifndef MSX_BIOS_INC
macro MSX_BIOS_INC
endmacro
...
EXTBIOS equ 0xFFCA
...
endif
-----------------------

-----------------------
; mapper.asm file
include "msx-bios.inc"

initMapper:
...
call EXTBIOS ; This is an error while assembling
...
-----------------------

-----------------------
; main.asm file
include "msx-bios.inc"
include "mapper.asm"
...
-----------------------

When I assemble main.asm I get an error that says EXTBIOS is defined twice.

- What is the proper way of making once inclusion?
- Another question. Is it possible to include global definitions from a sjasm module?

Thanks in advance.

Для того, чтобы оставить комментарий, необходимо регистрация или !login

By gdx

Prophet (2931)

Аватар пользователя gdx

12-08-2019, 01:57

By ARTRAG

Enlighted (6229)

Аватар пользователя ARTRAG

12-08-2019, 09:20

Look at the .lst file
You will see there when your label is included the second time