tasm error

A General Discussion forum for TI calculators

Moderator: MaxCoderz Staff

User avatar
Batman
New Member
Posts: 71
Joined: Thu 29 May, 2008 1:44 pm
Location: Over the Rainbow

tasm error

Post by Batman »

i have this error pop up when i try to execute my asm.bat file
tasm: file name too short (possibly garbled option flag): E.
i was trying to make my own directory for my source code and .8xp file...
does this mean that the directorys for them were too long?
example:

C:\Program Files\Crimson Editor\tools\Asm>asm test
==== Now assembling test.z80 for the TI-83 Plus ====
tasm: file name too short (possibly garbled option flag): E.
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: object file open error on Files"Crimson Editor"Ti
Cannot execute C:\PROGRA~1\CRIMSON EDITOR\TOOLS\ASM\DEVPAC8X.COM
==== Job finished. Program saved as test.8xp =====
==== Done ====

my asm.bat looks like this:

@echo off
echo ==== Now assembling %1.z80 for the TI-83 Plus ====
tasm -80 -i -b C:\"Program Files"\"Crimson Editor"\"Ti Source Programs"%1.z80 C:\"Documents and Settings"\"my_name"\"My Documents"\"TI"\"Calculator Programs"%1.bin
if errorlevel 1 goto ERRORS
cd C:\"Documents and Settings"\"my_name"\"My Documents"\"TI"\"Calculator Programs"
C:\"Program Files"\"Crimson Editor"\"tools"\"Asm"\devpac8x %1
cd C:\"Program Files"\"Crimson Editor"\"tools"\"Asm"
echo ==== Job finished. Program saved as %1.8xp ====
goto DONE

:ERRORS
echo ==== Errors!!! ====
: DONE
del C:\"Program Files"\"Crimson Editor"\"Ti Source Programs"%1.lst > NUL
del C:\"Documents and Settings"\"my_name\"My Documents"\TI\"Calculator Programs"%1.bin > NUL
echo ==== Done ====


whats wrong with it? :cry:
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Re: tasm error

Post by benryves »

That is possibly the most bizarre method of quoting long file names I've ever seen. :o

Put the quotation marks outside the paths. For example, where you have

Code: Select all

C:\"Program Files"\"Crimson Editor"\"Ti Source Programs"%1.z80
change it to

Code: Select all

"C:\Program Files\Crimson Editor\Ti Source Programs\%1.z80"
Also, why are you storing files in Program Files?
User avatar
Batman
New Member
Posts: 71
Joined: Thu 29 May, 2008 1:44 pm
Location: Over the Rainbow

Re: tasm error

Post by Batman »

...
Last edited by Batman on Fri 19 Jun, 2009 11:49 pm, edited 1 time in total.
User avatar
Batman
New Member
Posts: 71
Joined: Thu 29 May, 2008 1:44 pm
Location: Over the Rainbow

Re: tasm error

Post by Batman »

still not working... here is everything
C:\Program Files\Crimson Editor\tools\Asm>asm test
==== Now assembling test.z80 for the TI-83 Plus ====
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: list file open error on Settings\All
The system cannot find the path specified.
Cannot execute C:\PROGRA~1\CRIMSON EDITOR\TOOLS\ASM\DEVPAC8X.COM
==== Job finished. Program saved as test.8xp ====
Could Not Find C:\Program Files\Crimson Editor\Ti Source Programs\test.lst
The system cannot find the path specified.
==== Done ====

with asm.bat being:
@echo off
echo ==== Now assembling %1.z80 for the TI-83 Plus ====
tasm -80 -i -b "C:\Program Files\Crimson Editor\Ti Source Programs\"%1.z80 "C:\Documents and Settings\All Users\My

Documents\TI\Calculator Programs\"%1.bin
if errorlevel 1 goto ERRORS

cd "C:\Documents and Settings\All Users\My Documents\TI\Calculator Programs\"
"C:\Program Files\Crimson Editor\tools\Asm\"devpac8x %1
cd "C:\Program Files\Crimson Editor\tools\Asm\"
echo ==== Job finished. Program saved as %1.8xp ====
goto DONE
:ERRORS
echo ==== Errors!!! ====
: DONE
del "C:\Program Files\Crimson Editor\Ti Source Programs\"%1.lst > NUL
del "C:\Documents and Settings\All Users\My Documents\TI\Calculator Programs\"%1.bin > NUL
echo ==== Done ====

also, i don't know but it created a file called "and" (no extension) in the asm directory
it was just blank
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Re: tasm error

Post by benryves »

Stop putting quotation marks in the middle of paths! ;) They go outside the paths, like

Code: Select all

tasm -80 -i -b "C:\Program Files\Crimson Editor\Ti Source Programs\%1.z80" "C:\Documents and Settings\All Users\My Documents\TI\Calculator Programs\%1.bin"
or

Code: Select all

"C:\Program Files\Crimson Editor\tools\Asm\devpac8x" "%1"
User avatar
Batman
New Member
Posts: 71
Joined: Thu 29 May, 2008 1:44 pm
Location: Over the Rainbow

Re: tasm error

Post by Batman »

could it be the extension is too long?
User avatar
Batman
New Member
Posts: 71
Joined: Thu 29 May, 2008 1:44 pm
Location: Over the Rainbow

Re: tasm error

Post by Batman »

oh... sheesh don't have a cow! :P
i will try that.
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Re: tasm error

Post by benryves »

Try also temporarily getting rid of the @echo off line. This will cause the batch script to echo (display) each line in the console before it executes it, which could aid debugging.

(Your directory layout is giving me The Fear). :D
User avatar
Batman
New Member
Posts: 71
Joined: Thu 29 May, 2008 1:44 pm
Location: Over the Rainbow

Re: tasm error

Post by Batman »

C:\Program Files\Crimson Editor\tools\Asm>asm test
==== Now assembling test.z80 for the TI-83 Plus ====
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: source file open error on C:\Program Files\Crimson Editor\Ti Source Progra
ms\test.z80 C:\Documents and Settings\All Users\My Documents\TI\Calculator Progr
ams\test.bin
==== Errors!!! ====
==== Done ====

asm.bat=

@echo off
echo ==== Now assembling %1.z80 for the TI-83 Plus ====
tasm -80 -i -b "C:\Program Files\Crimson Editor\Ti Source Programs\%1.z80 C:\Documents and

Settings\All Users\My Documents\TI\Calculator Programs\%1.bin"
if errorlevel 1 goto ERRORS

cd "C:\Documents and Settings\All Users\My Documents\TI\Calculator Programs\"

"C:\Program Files\Crimson Editor\tools\Asm\devpac8x %1"
cd "C:\Program Files\Crimson Editor\tools\Asm\"
echo ==== Job finished. Program saved as %1.8xp ====
goto DONE
:ERRORS
echo ==== Errors!!! ====
: DONE

echo ==== Done ====


is that right???
User avatar
Batman
New Member
Posts: 71
Joined: Thu 29 May, 2008 1:44 pm
Location: Over the Rainbow

Re: tasm error

Post by Batman »

wow, taking the echo off just blew the berjeebers out of me. i am incapable of making any of it out... :)
User avatar
Batman
New Member
Posts: 71
Joined: Thu 29 May, 2008 1:44 pm
Location: Over the Rainbow

Re: tasm error

Post by Batman »

==== Now assembling test.z80 for the TI-83 Plus ====

C:\Program Files\Crimson Editor\tools\Asm>tasm -80 -i -b "C:\Program Files\Crims
on Editor\Ti Source Programs\test.z80 C:\Documents and Settings\All Users\My Doc
uments\TI\Calculator Programs\test.bin"
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: source file open error on C:\Program Files\Crimson Editor\Ti Source Progra
ms\test.z80 C:\Documents and Settings\All Users\My Documents\TI\Calculator Progr
ams\test.bin

C:\Program Files\Crimson Editor\tools\Asm>if errorlevel 1 goto ERRORS

C:\Program Files\Crimson Editor\tools\Asm>echo ==== Errors!!! ====
==== Errors!!! ====

C:\Program Files\Crimson Editor\tools\Asm>echo ==== Done ====
==== Done ====
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Re: tasm error

Post by benryves »

I'm not sure where these funky linebreaks are coming from in your pastes..?

The issue is that command-line arguments are delimited by spaces. Let's say you ran a program like this:

Code: Select all

program file1 file2 file3
There you have three arguments, nice and simple. Now, let's say a file name contained a space:

Code: Select all

program file1 some file file3
That would see four arguments - "file1", "some", "file" and "file3". To get around this problem, we put quotation marks around that argument:

Code: Select all

program file1 "some file" file3
The command-line processor recognises that anything entirely contained in quotation marks is a single argument. To make things more reliable, it's safer to quote anything coming from outside (eg %1) in quotation marks:

Code: Select all

program "file1" "some file" "file3"
Anyhow, this is how I think your batch file should look:

Code: Select all

@echo off
echo ==== Now assembling %1.z80 for the TI-83 Plus ====
tasm -80 -i -b "C:\Program Files\Crimson Editor\Ti Source Programs\%1.z80" "C:\Documents and Settings\All Users\My Documents\TI\Calculator Programs\%1.bin"
if errorlevel 1 goto ERRORS

cd "C:\Documents and Settings\All Users\My Documents\TI\Calculator Programs\"

"C:\Program Files\Crimson Editor\tools\Asm\devpac8x" "%1"
cd "C:\Program Files\Crimson Editor\tools\Asm\"
echo ==== Job finished. Program saved as %1.8xp ====
goto DONE
:ERRORS
echo ==== Errors!!! ====
: DONE

echo ==== Done ====
User avatar
Batman
New Member
Posts: 71
Joined: Thu 29 May, 2008 1:44 pm
Location: Over the Rainbow

Re: tasm error

Post by Batman »

too cool, but now devpac's not working...

C:\Program Files\Crimson Editor\tools\Asm>asm test
==== Now assembling test.z80 for the TI-83 Plus ====
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
tasm: pass 2 complete.
tasm: Number of errors = 0
Cannot execute C:\PROGRA~1\CRIMSON EDITOR\TOOLS\ASM\DEVPAC8X.COM
==== Job finished. Program saved as test.8xp ====
==== Done ====
User avatar
Batman
New Member
Posts: 71
Joined: Thu 29 May, 2008 1:44 pm
Location: Over the Rainbow

Re: tasm error

Post by Batman »

i can't even run devpac when its in that directory. but if i copy devpac.com and put it in my documents. it will run and say "nothing to do" - so why won't it work? is it because its in program files? or just too many parents and grandparents for it???, and great grandparents??? :)
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Re: tasm error

Post by benryves »

Possibly. Not sure. It's many years since I used this old series of tools. Have you tried Spasm?
Post Reply