Author Topic: SPASM  (Read 14802 times)

0 Members and 2 Guests are viewing this topic.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
SPASM
« on: October 15, 2010, 04:09:38 pm »
I was trying to get SPASM to run on my computer yesterday and I couldn't figure out how to get .8xp files from it. All I can get are .bin files. Do you have to use the command prompt to run SPASM in Windows?
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline qazz42

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1130
  • Rating: +30/-12
  • hiiiiiiiii
    • View Profile
Re: SPASM
« Reply #1 on: October 15, 2010, 04:10:32 pm »
You need either binpac or devpac to transform the .bins into .8xps

they work the same way as SPASM, as in you run them from the cmd

so

SPASM myprog.asm

binpac.py myprog.bin

(binpac need python btw)
« Last Edit: October 15, 2010, 04:12:13 pm by qazz42 »

Offline BuckeyeDude

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 283
  • Rating: +42/-0
    • View Profile
Re: SPASM
« Reply #2 on: October 15, 2010, 04:11:37 pm »
yes you do. if you are vista or greater its pretty easy to get cmd up and running, i can walk you through it. Or you can use a bat file to do the dirty work. the syntax is:
spasm [options] program.asm program.8xp

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: SPASM
« Reply #3 on: October 15, 2010, 04:12:48 pm »
Devpac? Isn't SPASM the Assembler?
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline BuckeyeDude

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 283
  • Rating: +42/-0
    • View Profile
Re: SPASM
« Reply #4 on: October 15, 2010, 04:13:47 pm »
You dont need either of those. spasm has a built in linker that makes them uncessary

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: SPASM
« Reply #5 on: October 15, 2010, 04:16:22 pm »
yes you do. if you are vista or greater its pretty easy to get cmd up and running, i can walk you through it. Or you can use a bat file to do the dirty work. the syntax is:
spasm [options] program.asm program.8xp

This might be a stupid question, but is the bat a batch file? Also, is the "spasm" part is the location of the SPASM executable in the computer?
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline BuckeyeDude

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 283
  • Rating: +42/-0
    • View Profile
Re: SPASM
« Reply #6 on: October 15, 2010, 04:19:33 pm »
yes and yes. you can do one of three things.
1. put spasm in the same directory as your source file
2. put spasm in the PATH variable and you can use it wherever you want
3. use relative paths to tell where spasm and the source file are

I personally reccommend #2, which is a little bit harder to setup, but very convenient. A batch file is good because you dont have to keep the command line up and running all the time, and its very easy for anyone to assemble your code

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: SPASM
« Reply #7 on: October 15, 2010, 04:24:44 pm »
Okay, how would you set up and run the Batch file?

 If I have to ask this, I'm probably not a good candidate for an ASM coder... ;)
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: SPASM
« Reply #8 on: October 15, 2010, 04:26:35 pm »
Btw SPAM is against the forum rules... oh wait, you meant SPASM. Nvm. :P

As for batch files you open Notepad, put the batch code there, save as txt, then rename the extension as .bat and simply run the .bat file. You can also save as .bat from Notepad but on some computers, even if you selected all files instead of plain text, it saves the file as name.bat.txt. X.x
« Last Edit: October 15, 2010, 04:27:26 pm by DJ Omnimaga »

Offline BuckeyeDude

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 283
  • Rating: +42/-0
    • View Profile
Re: SPASM
« Reply #9 on: October 15, 2010, 04:26:54 pm »
Nah its something you learn in time. Normally my batch files look something like this:
Code: [Select]
spasm -T -L Pokemon.asm Pokemon.8xk
wabbitemu Pokemon.8xk Pokemon.lab

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: SPASM
« Reply #10 on: October 15, 2010, 04:45:34 pm »
Hm, I think I'm doing this wrong.

Here's what I wrote in the batch:

Code: [Select]
C:\Users\username\Desktop\Calc programs\SPASM.exe C:\Users\username\Desktop\Calc programs\Hello World.txt C:\Users\username\Desktop\Calc programs\Hello World.8xp
Also, running it by clicking it doesn't do anything.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline BuckeyeDude

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 283
  • Rating: +42/-0
    • View Profile
Re: SPASM
« Reply #11 on: October 15, 2010, 04:47:08 pm »
You need quotes around the paths, because they have spaces in them
Code: [Select]
"C:\Users\username\Desktop\Calc programs\SPASM.exe" "C:\Users\username\Desktop\Calc programs\Hello World.txt" "C:\Users\username\Desktop\Calc programs\Hello World.8xp"

Offline TC01

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 344
  • Rating: +9/-0
    • View Profile
Re: SPASM
« Reply #12 on: October 15, 2010, 04:48:01 pm »
This is a slightly more complicated batch file I use, that prompts you for the files to compile when it runs- and therefore can be used for all your projects.

Code: [Select]
@echo off
title SPASM - TI-83 Plus Assembler
:main
set /p source=Source file:
set /p output=Output name:
echo.
echo Assembling %source% into %output%
spasm.exe Source\%source% Output\%output%
echo.
pause
set /p again=Assemble another file [y/n]:
if %again%==y goto main

It relies on having a Spasm working directory set up like this though:

Code: [Select]
\spasm.bat
\spasm.exe
\ti83plus.inc
\Source\
\Output\

I then have a shortcut to this batch file on my desktop, which I can run without using a command line.
« Last Edit: October 15, 2010, 04:48:50 pm by TC01 »



The userbars in my sig are links embedded links.

And in addition to calculator (and Python!) stuff, I mod Civilization 4 (frequently with Python).

Offline qazz42

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1130
  • Rating: +30/-12
  • hiiiiiiiii
    • View Profile
Re: SPASM
« Reply #13 on: October 15, 2010, 04:50:31 pm »
wait, spasm is a .bin to .8xp converter too?

Offline BuckeyeDude

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 283
  • Rating: +42/-0
    • View Profile
Re: SPASM
« Reply #14 on: October 15, 2010, 04:54:14 pm »
wait, spasm is a .bin to .8xp converter too?
Nope i'm just lying to get more people to use it :P