problems with sjasm

The place for codemasters or beginners to talk about programming any language for the Spectrum.
Post Reply
User avatar
777
Manic Miner
Posts: 526
Joined: Fri Jun 26, 2020 11:23 am
Location: sw uk

problems with sjasm

Post by 777 »

im trying to compile the filled vector routine from the l break into program website. unfortunately it compiles down to only 1k which i think is too small. i think its compiling the wrong file. heres the syntax that im using

sjasmplus --raw=out.bin b.txt c.txt v.txt

https://github.com/breakintoprogram/lib ... filled.z80

v is the vector routine
b is the output routine
c is the marco

am using the wrong syntax here?

if i run the code it just displays a black paper screen
i started programming the spectrum when i was 8 :-

1 plot rnd*255,rnd*175
2 goto 1

http://zxspeccy.great-site.net/
Ralf
Rick Dangerous
Posts: 2297
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: problems with sjasm

Post by Ralf »

I can't help you directly with your case but may have some hint. Personally I do it in a different way.

I always complile a single file which has in its code "pointers" to more files.
There are instructions like INCLUDE or INCBIN to achieve it like:

INCLUDE <Graphics.asm>
INCLUDE <Menu.asm>
INCLUDE <Text.asm>


The files need to be in the same directory so you could point them just but name, without any path.
User avatar
777
Manic Miner
Posts: 526
Joined: Fri Jun 26, 2020 11:23 am
Location: sw uk

Re: problems with sjasm

Post by 777 »

Ralf wrote: Tue Apr 30, 2024 2:54 pm I can't help you directly with your case but may have some hint. Personally I do it in a different way.

I always complile a single file which has in its code "pointers" to more files.
There are instructions like INCLUDE or INCBIN to achieve it like:

INCLUDE <Graphics.asm>
INCLUDE <Menu.asm>
INCLUDE <Text.asm>


The files need to be in the same directory so you could point them just but name, without any path.
no, its still doing the same thing. a black paper screen
i started programming the spectrum when i was 8 :-

1 plot rnd*255,rnd*175
2 goto 1

http://zxspeccy.great-site.net/
User avatar
MustardTiger
Microbot
Posts: 129
Joined: Tue May 02, 2023 8:05 pm

Re: problems with sjasm

Post by MustardTiger »

I think it's because those files are just the functions to draw vectors and output to the screen. Currently, because you have the output.txt first that gets compiled to the first address you org'd at and that clears the screen to black and then returns.

You need some code to call those functions in a meaningful way.

There's some example code in that github repo here. https://github.com/breakintoprogram/lib ... vector.z80

I
User avatar
flatduckrecords
Manic Miner
Posts: 803
Joined: Thu May 07, 2020 11:47 am
Location: Oban, Scotland
Contact:

Re: problems with sjasm

Post by flatduckrecords »

Dean explains a bit more about the libraries in his blog with links to the example files.
Post Reply