Please help -'line 0001 No END directive before EOF.' driving me crazy

TI-82, TI-83 (plus, silver..), TI-84, TI-85 and TI-86
Post Reply
roboman01
New member
Posts: 1
Joined: Wed Nov 11, 2009 3:23 am

Please help -'line 0001 No END directive before EOF.' driving me crazy

Post by roboman01 »

Hey everyone,

I'm really excited to get started with z88dk for my ti83+. Here's what I'm doing so far:

I have a test.c file (I think I just copied it from a post here, but for the record I actually am a fairly good c programmer):

test.c

Code: Select all

#include <stdio.h>

int main()
{

    printf("Hello!");
    return 0;
}
I've been following bits and pieces of instructions on this forum to try and get this working in an emulator, called 'TI Flash Debugger' by Texas Instruments.

So next, I run the following command in command prompt:

Code: Select all

zcc +ti8xansi -startup=10 -o hello.bin test.c
No errors or anything so far.

However, I'm not exactly sure what to do next.... I've tried using tasm, but what happens is I use this code in command prompt:

Code: Select all

asm hello
and it gives me this:

Code: Select all

C:\z88dk\bin>echo Syntax: asm [NAME (w/o extension)] [PATH]
Syntax: asm [NAME (w/o extension)] [PATH]
----- Assembling hello for the TI-83 Plus...
TASM Z80 Assembler.       Version 3.1  February, 1998.
 Copyright (C) 1998 Squak Valley Software
tasm: pass 1 complete.
tasm: line 0001 No END directive before EOF.
tasm: pass 2 complete.
tasm: Number of errors = 1
----- There were errors.
Now what's really confusing is it gives me that REGARDLESS of what is in hello.bin! Even if hello.bin doesn't exist it gives me that. I can't understand what's going on.

Should I even be using tasm? I'm not even sure I understand what the function of tasm is completely. Maybe if someone could simply point me in the right direction now that I've created the .bin file using "zcc +ti8xansi -startup=10 -o hello.bin test.c"

Thanks so much in advance!
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

Post by alvin »

roboman01 wrote:Should I even be using tasm? I'm not even sure I understand what the function of tasm is completely. Maybe if someone could simply point me in the right direction now that I've created the .bin file using "zcc +ti8xansi -startup=10 -o hello.bin test.c"
No, you shouldn't be using tasm :-) tasm is an assembler that takes z80 assembler mnemonics and turns that into z80 machine code (a sequence of bytes, machine instructions). The particular version of tasm you have seems to be customized to assemble for a ti target, which could mean it adds some header information so that the machine code is recognized as such by the calculator's shell / operating system / whatever.

z88dk supplies a complete toolchain: C translation to assembler (zcc), assembler (z80asm - turns those asm mnemonics, whether generated by the compiler or your own asm code, into machine code; this is the same function as tasm), linker / librarian (z80asm, where pre-written code used by the C program or assembler program gets pulled in and the whole works gets turned into the final binary. Simple assemblers like tasm cannot do this).

The difficulty with the ti calculators is that you cannot just run a raw machine code file. It needs to be recognized by the calculator as a machine code program and this involves inserting a header at the front. From what I understand many calculators cannot run machine code because their operating system won't allow it, so you have to run a shell that *will* run a machine code program. To complicate things further, multiple shells are available that require different headers.

Unfortunately none of the z88dk devs are too terribly familiar with the ti platform so it's difficult to offer good instructions. Stef is the closest thing to an expert on the z88dk dev team and he may be able to help when he turns up. You may have some of your questions answered on this wiki page:

http://www.z88dk.org/wiki/doku.php?id=platform:ticalc

and perhaps reading a few posts in this subforum will get things working. Your question comes up so often that we probably need someone super-familiar with the ti platform to take responsibility for it and get everything up to date.
Post Reply