C for the Zilog Z80?

This is a discussion on C for the Zilog Z80? within the Tech Board forums, part of the Community Boards category; I've been tinkering abit with my new graphing calculator, it's a TI 84 Plus. Wikipedia says that it supports C ...

  1. #1
    Internet Superhero
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    964

    C for the Zilog Z80?

    I've been tinkering abit with my new graphing calculator, it's a TI 84 Plus. Wikipedia says that it supports C if you have a computer with a cross-compiler, well, after some googling i came up with a compiler called SDCC, which can compile code for the Z80, but this is as far as i got.

    After compiling a small Hello World with my new compiler, i didn't get the usual "exe" file (Was kind of expecting this, since Z80 isn't an X86), instead, i got 8 or 9 files, all called main, and with different extensions (.mem .sym .rst and so on), but the software i use for interfacing with my calculator won't accept any of them, it just says that the device doesn't support this kind of file...

    Where do i go from here?

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    The first step is to figure out WHAT file your calculator WILL accept - if any.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Internet Superhero
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    964
    Quote Originally Posted by matsp View Post
    The first step is to figure out WHAT file your calculator WILL accept - if any.

    --
    Mats
    Well, the interface software comes with it's own IDE for writing BASIC programs for the device, and the files i can create in there is either .8xp or .tpf....

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,546
    What's the name of the s/w you already have for loading programs, and does it have any online documentation.

    There are (I think) several problems to solve:
    - the object file formats of SDCC and your existing tools
    - where in memory object files are loaded, are images located absolutely or relatively.
    - how to call the resident API on the target, for say input and output.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    Quote Originally Posted by Neo1 View Post
    Where do i go from here?
    http://www.ocf.berkeley.edu/%7Epad/faq/index.html ?
    http://forum.ticalcs.net/index.php ?
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  6. #6
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,546
    /me bows to Dave's google skills
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  7. #7
    Internet Superhero
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    964
    Quote Originally Posted by Salem View Post
    What's the name of the s/w you already have for loading programs, and does it have any online documentation.

    There are (I think) several problems to solve:
    - the object file formats of SDCC and your existing tools
    - where in memory object files are loaded, are images located absolutely or relatively.
    - how to call the resident API on the target, for say input and output.
    The software i'm using to interface with the calculator is called TI-Connect, i don't think i can connect to it in any other ways...

    Regarding the input/output on the TI84, is was under the impression that i would just be able to use stdout/stdin as on most other platforms?

    I'm not sure if i understand the second problem you are mentioning?

  8. #8
    Internet Superhero
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    964
    @Dave:
    Well, most of the sites dedicated to the TI calculators are about assembly or BASIC, i've been unable to find anything about C?

  9. #9
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,546
    Well just look at the ASM information available.

    Then look at what say "gcc -S prog.c" produces (which will also be the ASM) and go from there.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Z80 Compiler (for Ti)
    By Elysia in forum C Programming
    Replies: 43
    Last Post: 03-21-2008, 08:09 AM
  2. Interrupts on Z80
    By Vicious in forum Tech Board
    Replies: 4
    Last Post: 08-30-2004, 06:53 PM
  3. it's lame and 500k of it is padded with zeros. It's z80 binary time!
    By Scourfish in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 03-07-2002, 10:48 PM
  4. DJGPP & Z80 Problems
    By Robert_Ingleby in forum C++ Programming
    Replies: 3
    Last Post: 10-24-2001, 04:59 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21