ZXSpin assembler not working

The place for codemasters or beginners to talk about programming any language for the Spectrum.
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: ZXSpin assembler not working

Post by MrPixel »

Tried Pasmo. it doesn't work. i'm finicky with Command lines anyway. are there any assemblers i can run as .Tzx

**Post edited by admin(PeterJ) to remove quote. Content not changed.
User avatar
PeterJ
Site Admin
Posts: 6877
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: ZXSpin assembler not working

Post by PeterJ »

[mention]MrPixel[/mention] please could you avoid quoting and therefore duplicating whole posts. Cheers!

Pasmo does work. I compiled your earlier example. Take a look here. What error are you getting?

viewtopic.php?f=6&t=559#p7684

Pasmo creates .tap files you can convert them to .tzx. I think there may be a tool for this in the Fuse Utilities package.
namco
Manic Miner
Posts: 247
Joined: Mon Dec 04, 2017 8:55 pm

Re: ZXSpin assembler not working

Post by namco »

Pasmo command is:

pasmo --tap yourasmfile.asm yourasmfile.tap

or

pasmo --tapbas yourasmfile.asm yourasmfile.tap

Bear in mind that these don't have file paths as I'm used to having pasmo in my cmd path so I can execute it anywhere.

A file path example is something like this:

pasmo --tap C:/path/to/gamedev/folder/yourasmfile.asm C:/path/to/gamedev/folder/yourasmfile.tap

The difference between --tap and --tapbas is that tap will put your code in bytes loadable form and I think it can be loaded as so:

LOAD ""CODE

tapbas will include a basic loader (and presumably a screen loader but I'm not too sure on that as I'm just used to using the --tap option on the standard Spectrum). I generally use the tapbas option when coding on the Spectrum Next.
User avatar
PeterJ
Site Admin
Posts: 6877
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: ZXSpin assembler not working

Post by PeterJ »

Nice explanation [mention]namco[/mention]
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: ZXSpin assembler not working

Post by MrPixel »

PeterJ wrote: Tue Mar 27, 2018 9:43 pm @MrPixel please could you avoid quoting and therefore duplicating whole posts. Cheers!

Pasmo does work. I compiled your earlier example. Take a look here. What error are you getting?

viewtopic.php?f=6&t=559#p7684

Pasmo creates .tap files you can convert them to .tzx. I think there may be a tool for this in the Fuse Utilities package.
i double click to start, see a quick cmd screen, then nothing.
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: ZXSpin assembler not working

Post by Nomad »

MrPixel wrote: Wed Mar 28, 2018 12:32 am i double click to start, see a quick cmd screen, then nothing.
Image

Ok fella, the problem you are having is you are trying to use a command line application and expecting it to behave like a gui native thing.

You need to use the command line/terminal. Pasmo wants to be friends. But you need to use it the way it wants to. Kind of like you don't take every girl to Mcdonalds then back behind the dumpsters with $5. Not every program wants to be manipulated on the desktop gui for all the other applications to see.. Some want to be wined and dined, treated like a lady - given parameters, hopes dreams before they will do something useful/dirty in the privacy of the terminal window :lol: .

With Pasmo you will hit the wall with stuff like Macros & Local functions. That is crippling to developing large/complex programs. Sure you can do very impressive stuff but its really something that is most useful in the begging. But to migrate to Zeus later is tough. You got to learn all this new stuff when you are used to the crusty yet familiar ways of Pasmo. It's like trading up from a backwoods hillbilly chick to a city girl. It might seem like a cakewalk at first but you are going to make mistakes and the new program will not do the same things like you did before, she's got new demands but also high highfalutin ways to contend with.

This is another reason to use Zeus.. it has an IDE, you are probably more used to this than a command line experience.
Last edited by Nomad on Wed Mar 28, 2018 12:55 am, edited 1 time in total.
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: ZXSpin assembler not working

Post by MrPixel »

i tried the command line, same issue. even went straight to the file itself
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: ZXSpin assembler not working

Post by Nomad »

Did it generate a tap file in the directory?

after you used the following command

Code: Select all

pasmo --tapbas mrpixel.asm mrpixel.tap
check with

Code: Select all

ls *.tap
or if you are of the windows persuasion..

Code: Select all

dir *.tap
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: ZXSpin assembler not working

Post by MrPixel »

i saved as an ASM file and The command line does indeed open the file. Pasmo still won't open however, even though i did as you asked
User avatar
Seven.FFF
Manic Miner
Posts: 744
Joined: Sat Nov 25, 2017 10:50 pm
Location: USA

Re: ZXSpin assembler not working

Post by Seven.FFF »

Pasmo doesn't open at all, it operates on the input file and generates the output file (or emits an error message to stdout if one occurs).

I may be wrong, but it sounds like you're not familiar with how command line applications work. Please excuse me if that's not the case.

https://en.wikipedia.org/wiki/Command-line_interface
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel NXTP ESP Update ESP Reset CSpect Plugins
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: ZXSpin assembler not working

Post by MrPixel »

Seven.FFF wrote: Wed Mar 28, 2018 3:34 am Pasmo doesn't open at all, it operates on the input file and generates the output file (or emits an error message to stdout if one occurs).

I may be wrong, but it sounds like you're not familiar with how command line applications work. Please excuse me if that's not the case.

https://en.wikipedia.org/wiki/Command-line_interface
bingo. not really that familiar. how exactly do i use it? i'm used to python so this program is foreign
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: ZXSpin assembler not working

Post by MrPixel »

i got it! :D
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: ZXSpin assembler not working

Post by MrPixel »

Praise Jesus, finally made a tap file
User avatar
R-Tape
Site Admin
Posts: 6406
Joined: Thu Nov 09, 2017 11:46 am

Re: ZXSpin assembler not working

Post by R-Tape »

Congrats! We expect a finished game in the archive after all this :D

I still make my TAP files in the emulator using 'insert tape' and SAVE""CODE from speccy BASIC. I don't know where that fits with Nomad's McDonalds analogy, a trip to the museum and then £5 behind the bins perhaps.
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

Re: ZXSpin assembler not working

Post by Nomad »

Lol probably more Burger king. :lol:

In all seriousness I think for most people, especially if they are not used to the low level shuffle that is spectrum assembly its going to be a bit rough starting out. But its well worth the journey. High level languages are all fine and dandy but its nothing compared to getting a assembly program running properly on one of these old machines. :lol:

Stick with it Señor Pixel, the fun starts when you have bent the tools to your will. All the tools are going to be quirky and not quite right but that is part of the fun. :lol: Tend to high five the cat when something assembles and runs first time :lol:

Take slow steps, enjoy the journey no matter how frustrating. The best thing with the Spectrum is the userbase. People for the most part are very friendly and want to share the secret of the specfu.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2641
Joined: Mon Nov 13, 2017 3:16 pm

Re: ZXSpin assembler not working

Post by Ast A. Moore »

R-Tape wrote: Wed Mar 28, 2018 5:59 am I still make my TAP files in the emulator using 'insert tape' and SAVE""CODE from speccy BASIC.
Wow, dude . . . That’s, like, not cool, man. :lol:

Glad I spent some time creating a syntax highlighter and a few scripts and templates for the TextMate+zasm combo.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
User avatar
Sokurah
Manic Miner
Posts: 286
Joined: Tue Nov 14, 2017 10:38 am
Contact:

Re: ZXSpin assembler not working

Post by Sokurah »

Ast A. Moore wrote: Wed Mar 28, 2018 10:26 am
R-Tape wrote: Wed Mar 28, 2018 5:59 am I still make my TAP files in the emulator using 'insert tape' and SAVE""CODE from speccy BASIC.
Wow, dude . . . That’s, like, not cool, man. :lol:

Glad I spent some time creating a syntax highlighter and a few scripts and templates for the TextMate+zasm combo.
Haha, R-Tape, so do I :lol:
Website: Tardis Remakes / Mostly remakes of Arcade and ZX Spectrum games.
My games for the Spectrum: Dingo, The Speccies, The Speccies 2, Vallation & Sqij.
Twitter: Sokurah
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2641
Joined: Mon Nov 13, 2017 3:16 pm

Re: ZXSpin assembler not working

Post by Ast A. Moore »

Sokurah wrote: Wed Mar 28, 2018 10:33 am
Ast A. Moore wrote: Wed Mar 28, 2018 10:26 am Wow, dude . . . That’s, like, not cool, man. :lol:

Glad I spent some time creating a syntax highlighter and a few scripts and templates for the TextMate+zasm combo.
Haha, R-Tape, so do I :lol:
*backs away slowly* :shock:
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
User avatar
R-Tape
Site Admin
Posts: 6406
Joined: Thu Nov 09, 2017 11:46 am

Re: ZXSpin assembler not working

Post by R-Tape »

Ast A. Moore wrote: Wed Mar 28, 2018 11:04 am *backs away slowly* :shock:
As the SPIN assembler dumps the code directly I use that for all the development and testing, so I only need to make the TAP (or TZX) at the every end.

It's a very satisfying process, all the way from the startup loader block (don't forget to POKE 23739), dumping the loading screen in upper memory to the main code blocks. I generally draw the line at using real hardwear for this step!

I can detail all this at some point but it looks like MrPixel is sorted for now.
Ralf
Rick Dangerous
Posts: 2287
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: ZXSpin assembler not working

Post by Ralf »

I still make my TAP files in the emulator using 'insert tape' and SAVE""CODE from speccy BASIC.
Haha, R-Tape, so do I
And me too :lol:

I write a loader in basic, save it to tape with SAVE "prog" LINE 10
Then import loading screen to emulator, save it to tape with SAVE "screen" SCREEN
Then import asm program as .bin file to emulator and save it to tape with SAVE "code" CODE 30000,20000

Actually I do it all only when my program is complete. During development I work only with .sna files. Creating a tape is the final touch, 10 minutes of work after 50 hours of coding or so.
User avatar
Morkin
Bugaboo
Posts: 3274
Joined: Mon Nov 13, 2017 8:50 am
Location: Bristol, UK

Re: ZXSpin assembler not working

Post by Morkin »

(Morkin holds his hand up with everyone else) "Me too..!" :lol:

I used Spin, but only because I don't know how to do command line stuff, like some of you GUIphobes round here, I'm not in the Matrix like the rest of you.. ;) :D

I was going to try out some other packages, but despite its 'features', Spin was the first one that let me just pick it up and create stuff straight away without any configuration issues. The only problems I had were:
  • the editor, could be a bit flaky at times; fixes = (a) use notepad when copying and pasting very large chunks of code, (b) save multiple versions of code just in case!
  • I would have liked a better way of seeing character strings in the debugger (the window re-sizing seemed a bit weird), there might be an easy way that I'm missing, though it ultimately did what I needed it to do
  • the 'stable version' (0.666) doesn't seem to want to play BEEPer sound FX if you select the Speccy 48k model
Otherwise I really liked using it.
My Speccy site: thirdharmoniser.com
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: ZXSpin assembler not working

Post by MrPixel »

though i parted ways with Atari Forum, i'm glad. a few posts in the chat room and everyone turns hostile. so i left
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2641
Joined: Mon Nov 13, 2017 3:16 pm

Re: ZXSpin assembler not working

Post by Ast A. Moore »

Morkin wrote: Wed Mar 28, 2018 1:33 pm (Morkin holds his hand up with everyone else) "Me too..!" :lol:
Keep ’em comin’. The exorcists says he charges by the hour. Whether it’s one person or ten—makes no difference.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
User avatar
Guesser
Manic Miner
Posts: 641
Joined: Wed Nov 15, 2017 2:35 pm
Contact:

Re: ZXSpin assembler not working

Post by Guesser »

I don't. My tap files get generated automatically by the makefile when I build each project.
MrPixel
Microbot
Posts: 170
Joined: Sat Mar 24, 2018 7:42 pm

Re: ZXSpin assembler not working

Post by MrPixel »

i found an assembly listing in an old scan of zx computing. it was really weird. here's my modified code:

org 32768
ld hl,22527
ld bc,192
push bc
ld bc,-31
add hl,bc
ld a,(hl)
ld d,h
ld e,l
inc hl
ld bc,31
ldir
dec hl
ld (hl) ,a
ld bc,-32
add hl,bc
pop bc

dec bc
ld a,b
or c
to
loop
pop hl
ld bc,24
ld de,22528
ld hl,22529
ld a,(de)
push bc
ld bc,31
ldir
inc de
inc hl
inc bc
inc hl
ret

and here's the original:
https://archive.org/stream/ZX-computing ... 3/mode/2up

what's weird is that the original code refused to assemble without modifications. i think i screwed it up it's supposed to be a scroll right routine
Post Reply