Compiler Pains

TI-82, TI-83 (plus, silver..), TI-84, TI-85 and TI-86
Post Reply
yippie_skippie
New member
Posts: 2
Joined: Wed May 18, 2011 8:40 pm

Compiler Pains

Post by yippie_skippie »

Just trying to compile a simple hello world program...with no luck!

OS is Windows XP 32-bit

Code: Select all

C:\z88dk\ross_test>zcc -version 
zcc - Frontend for the z88dk Cross-C Compiler
v2.58 (C) 22.6.2009 D.J.Morris

C:\z88dk\ross_test>cat test.c 
#include <stdio.h>

int main() 
{
    printf("hello calculator");
    return 0;
}

C:\z88dk\ross_test>zcc +ti83 test.c 
        1 file(s) copied.
        1 file(s) copied.
Unrecognised argument: \\
copy C:\z88dk\lib\ti83_crt0.opt C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s15fg_1.opt
copy C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s15fg_1.opt C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s15fg_1.asm
zcpp -I. -DZ80 -DSMALL_C -DTI83 -D__TI83__ -DSCCZ80 -IC:\z88dk\include  test.c C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s15fg_.i
sccz80    -\\  C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s15fg_.i
copt C:\z88dk\lib\z80rules.2 < C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s15fg_.asm > C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s15fg_.op1
copt C:\z88dk\lib\z80rules.1 < C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s15fg_.op1 > C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s15fg_.opt
z80asm -eopt -ns -Mo -IC:\z88dk\lib C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s15fg_.opt
z80asm -a -m -Mo -LC:\z88dk\lib\clibs -oa.bin -indos  -iti83_clib  -iz80_crt0  

C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s15fg_1.opt C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s15fg_.o
1 errors occurred during assembly
Key to filenames:
C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s15fg_.o = test.c
File 'C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s15fg_1.asm', at line 2, File open/read 
 error

C:\z88dk\ross_test>appmake +ti83 -b test.bin 

Failed to open input file: test.bin

C:\z88dk\ross_test>pause
Press any key to continue . . .
Not sure why, but these *.opt files are not appearing in my Temp folder....I would manually put them there, but every time I run zcc it seems to create a random filename.

Any suggestions?
User avatar
dom
Well known member
Posts: 2072
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

The .op* are intermediate files which are deleted automatically. You can keep them locally with the -notemp option.

Looking at this, it looks like it's failing to find the file c:\z88dk\lib\ti83_crt0.asm quite why I'm not sure - is this a nightly or 1.9?
yippie_skippie
New member
Posts: 2
Joined: Wed May 18, 2011 8:40 pm

Post by yippie_skippie »

It was version 1.9,

I rolled back to 1.8 and it cleared the problem:

Code: Select all

C:\z88dk\ross_test>zcc -version 
zcc - Frontend for the z88dk Cross-C Compiler
v2.57 (C) 7.10.2007 D.J.Morris

C:\z88dk\ross_test>cat test.c 
#include <stdio.h>

int main() 
{
    printf("hello calculator");
    return 0;
}

C:\z88dk\ross_test>zcc +ti83 test.c 
        1 file(s) copied.
        1 file(s) copied.
copy C:\z88dk\lib\ti83_crt0.opt C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s1po_1.opt
copy C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s1po_1.opt C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s1po_1.asm
zcpp -I. -DZ80 -DSMALL_C -DTI83 -D__TI83__ -DSCCZ80 -IC:\z88dk\include  test.c C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s1po_.i
sccz80    -//  C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s1po_.i
copt C:\z88dk\lib\z80rules.2 < C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s1po_.asm > C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s1po_.op1
copt C:\z88dk\lib\z80rules.1 < C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s1po_.op1 > C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s1po_.opt
z80asm -eopt -ns -Mo C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s1po_.opt
z80asm -a -m -Mo -oa.bin -iC:\z88dk\lib\clibs\ndos  -iC:\z88dk\lib\clibs\ti83_clib  -iC:\z88dk\lib\clibs\z80_crt0  C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s1po_1.opt C:\DOCUME~1\JPETTI~1\LOCALS~1\Temp\s1po_.o

C:\z88dk\ross_test>appmake +ti83 -b a.bin 
'a.bin' successfully converted to 'a.83p'

C:\z88dk\ross_test>pause
Press any key to continue . . .
Now I just need to target the TI-84P, figure out input/output, and test it on my emulator (currently using Wabbitemu with a legally obtained Rom), and I'll be in business
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

You are probebly running the installer-assisted versions, they're both outdated..
Post Reply