Path: csiph.com!news.swapon.de!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: TRS-90 Newsgroups: comp.sys.apple2.programmer Subject: An Attempt at CC65 Date: Sun, 30 Jun 2024 01:01:12 GMT Organization: A noiseless patient Spider Lines: 43 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Injection-Date: Sun, 30 Jun 2024 02:55:05 +0200 (CEST) Injection-Info: dont-email.me; posting-host="c3714b2e3525a3481490ebe372d0c54a"; logging-data="200637"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Rl0cAV/z4iZpPUMkNYPEDRlSLmXmdhQE=" User-Agent: SNAP v1.2.2 (GSOS 6.0.1 (65816)) Cancel-Lock: sha1:TLUfhXihwQU0TxFrP9xSFsyEHvw= Xref: csiph.com comp.sys.apple2.programmer:6311 So I imagine I'm so far in the wrong direction that I may earn a laugh, but that's ok! I'm trying to recreate this Applesoft line in C with CC65: GR : PRINT "GR SET" So I realized that there does not seem to be a GR command in CC65 and after digging around in a disassembly listing I now have (again in BASIC): CALL -1216 : PRINT "GR SET" REM $FB40 So an least I'm calling the sub without the Applesoft command. Works good. Here's my C attempt. It freezes the system and never gets to the print command: ------------------------------ /* cl65 -O -t apple2enh setgr.c */ # include void gr() { asm ("jsr FB40"); } int main() { gr(); printf("GR SET\n"); return 0; } ------------------------------- I guess I thought I could just switch languages, compile, and run. I thought I could rewrite some of my silly BASIC programs in C and gain some speed and then I realized it may not be that simple. I've seen the TGI drivers. Is that how to get into GR and HGR and such? Thanks all! TRS-90