Page 1 of 2

tasm error

Posted: Fri 19 Jun, 2009 9:49 pm
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:

Re: tasm error

Posted: Fri 19 Jun, 2009 10:58 pm
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?

Re: tasm error

Posted: Fri 19 Jun, 2009 11:03 pm
by Batman
...

Re: tasm error

Posted: Fri 19 Jun, 2009 11:32 pm
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

Re: tasm error

Posted: Sat 20 Jun, 2009 12:28 am
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"

Re: tasm error

Posted: Sat 20 Jun, 2009 12:29 am
by Batman
could it be the extension is too long?

Re: tasm error

Posted: Sat 20 Jun, 2009 12:31 am
by Batman
oh... sheesh don't have a cow! :P
i will try that.

Re: tasm error

Posted: Sat 20 Jun, 2009 12:34 am
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

Re: tasm error

Posted: Sat 20 Jun, 2009 12:39 am
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???

Re: tasm error

Posted: Sat 20 Jun, 2009 12:41 am
by Batman
wow, taking the echo off just blew the berjeebers out of me. i am incapable of making any of it out... :)

Re: tasm error

Posted: Sat 20 Jun, 2009 12:42 am
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 ====

Re: tasm error

Posted: Sat 20 Jun, 2009 12:46 am
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 ====

Re: tasm error

Posted: Sat 20 Jun, 2009 12:54 am
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 ====

Re: tasm error

Posted: Sat 20 Jun, 2009 1:00 am
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??? :)

Re: tasm error

Posted: Sat 20 Jun, 2009 1:07 am
by benryves
Possibly. Not sure. It's many years since I used this old series of tools. Have you tried Spasm?