Sjasm - can't compile anything

Door Code Witcher

Resident (43)

afbeelding van Code Witcher

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.

Aangemeld of registreer om reacties te plaatsen

Van Juan Luis

Master (135)

afbeelding van Juan Luis

15-09-2021, 07:48

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

Van Metalion

Paragon (1446)

afbeelding van Metalion

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).

Van Code Witcher

Resident (43)

afbeelding van Code Witcher

15-09-2021, 18:02

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