Sjasm - can't compile anything

By Code Witcher

Resident (43)

Code Witcher's picture

15-09-2021, 06:11

Hi guys.
This is my code:

output "ejemplo1.bin"

db #fe
dw END

org #8500

	ld a, [#8600]
	ld b, a
	ld a, [#8601]
	add a, b
	ld [#8602], a



And this is what I'm getting when trying to compile it:
C:\Users\Daniel\Programming\MSX\asm>sjasm ejemplo1.asm
Sjasm Z80 Assembler v0.42c -
ejemplo1.asm(1) : Unrecognized instruction: "ejemplo1.
ejemplo1.asm(3) : Label not found: fe
ejemplo1.asm(4) : Unrecognized instruction: start
ejemplo1.asm(5) : Duplicate labelname: dw

Any idea what I'm doing wrong?
Please help. Thanks.

Login or register to post comments

By Juan Luis

Master (147)

Juan Luis's picture

15-09-2021, 07:48

Add a tab character before output, db, and dw.

By Metalion

Paragon (1628)

Metalion's picture

15-09-2021, 08:49

Yes, first colum is only for labels.
Any instruction or directive must be in the second column.

Also, 'org' is not a directive in Sjasm.
You must use 'defpage', 'page' and 'code' (see 'Output, paging and code parts' in the help pages).

By Code Witcher

Resident (43)

Code Witcher's picture

15-09-2021, 18:02

Yea, awesome. Thank you. The tutorial didn't explain this and I wasted so much time. Thanks.