A89: Re: TIGCC Help


[Prev][Next][Index][Thread]

A89: Re: TIGCC Help




> I have attached a very short source code to this email and was wondering if
> you can see any errors in it.

I'll just paste the code in here:
---------------------------------------------------------------
#include <nostub.h>
#include <all.h>

int _ti89;

void _main(void)
{
 LCD_BUFFER buffer;
 LCD_save(buffer);
 ClrScr();
 DrawStr(1,1,"Demo By Rob Smith",A_NORMAL);
 DrawStr(1,10,"Press Any Key To Continue",A_NORMAL);
 ngetchx();
 ClrScr();
 ICON char =
{{0x3C0,0x420,0xA50,0x420,0x240,0x180,0x180,0x3FFC,0x43C2,0x43C2,0x3C0,0x420,0x8
10,0x1008,0x1008,0x1008}};
 ICON* picon;
 picon = 0;
 picon = &char;
 int X = 0;
 int Y = 0;
 for(X=0;X<=40;X+=2) {
  for(Y=0;Y<=40;Y+=2)
  {
   ClrScr();
   DrawIcon(X,Y,picon,A_REPLACE);
  }
 }
 ngetchx();
 GrayMode(GRAY_OFF);
 ClrScr();
 ngetchx();
 LCD_restore(buffer);
}
---------------------------------------------------------------

One obvious error is that you try to allocate variables with code in between
(starting with ICON). This can't be done in plain C AFAIK.
Also, char is a reserved name in C. It's short for "character", a.k.a. "signed
byte".

 / Niklas Brunlid
Check out Prosit for the TI-89 / TI-92+ at http://prosit.ticalc.org
Random PQF Quote follows:

The Yen Buddhists are the richest religious sect in the universe. They hold
that the accumulation of money is a great evil and a burden to the soul.
They therefore, regardless of personal hazard, see it as their unpleasant
duty to acquire as much as possible in order to reduce the risk to innocent
people.
       -- (Terry Pratchett, Witches Abroad)

----- Original Message -----
From: "Rob Smith" <Kormoc@netzero.net>
To: <assembly-89@lists.ticalc.org>
Sent: Tuesday, March 21, 2000 10:35 PM
Subject: A89: TIGCC Help






Follow-Ups: References: