getting started with asm for svi?

Post Reply
sakalli
New member
Posts: 3
Joined: Sat Jan 09, 2021 11:08 am

getting started with asm for svi?

Post by sakalli »

is there a simple getting started guide somewhere here with the first steps how to compile asm for the svi?
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Re: getting started with asm for svi?

Post by stefano »

In my knowledge, not specifically for z88dk.
If you're interested in pure assembly you could set your ORG address to 34816 and take benefit of appmake.
The assembler we provide is "z80asm" AKA "z88dk-z80asm".

e.g.

INCLUDE "target/svi/def/svibios.def"
org 34816
call $53 ; Hide function key menu
ret


z80asm -b -oprg.bin prg.asm
appmake +svi ... (-h for options ;) )
sakalli
New member
Posts: 3
Joined: Sat Jan 09, 2021 11:08 am

Re: getting started with asm for svi?

Post by sakalli »

perfect. this is basically it :-) thank you
sakalli
New member
Posts: 3
Joined: Sat Jan 09, 2021 11:08 am

Re: getting started with asm for svi?

Post by sakalli »

i can get the assembler to compile the binary, if i add the full path to the include, but the appmake does not produce anything.

using your sample code and the following:
appmake +svi -b hello.bin -o hello.app
Last edited by sakalli on Sat Jan 09, 2021 4:57 pm, edited 2 times in total.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Re: getting started with asm for svi?

Post by stefano »

I suggest to build a simple example in C in verbose mode, e.g. take examples/console/world.c

zcc +svi -v -create-app world.c

..the appmake command will be shown at bottom
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Re: getting started with asm for svi?

Post by stefano »

I forgot to mention.. I put in svibios.def just to suggest you where to find the asm constants.
They get useful, e.g. in case you wish write portable code between SVI and MX.
sakalli
New member
Posts: 3
Joined: Sat Jan 09, 2021 11:08 am

Re: getting started with asm for svi?

Post by sakalli »

that was indeed super helpful. had some stupid env problems. but also needed provide the origin as an argument to appmake to get it to work. ran it on openmsx. this is pretty cool. magic even ;-). thank you <3

steps for future reference:
$ z80asm -b -ohello.bin hello.asm
$ appmake +svi -b "hello.bin" --org 34816 --audio # the audio flag needed to get the wav, openmsx does not seem to work with the .cas files
$ openmsx -machine Spectravideo_SVI-328 -cassetteplayer hello.wav

inside svi:
bload "cas:",r
Post Reply