Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!bloom-beacon!eru!luth!d87-khd From: d87-khd@sm.luth.se (Karl-Gunnar Hultland) Newsgroups: comp.sys.amiga Subject: Re: Help with C. Message-ID: <760@tau.sm.luth.se> Date: 22 Feb 90 10:50:38 GMT References: <11668@baldrick.udel.EDU> Reply-To: Karl-Gunnar Hultland Organization: University of Lulea, Sweden Lines: 58 UUCP-Path: {uunet,mcvax}!sunic.se!tau.luth.se!d87-khd In article <11668@baldrick.udel.EDU> GWO110%URIACC.BITNET@brownvm.brown.edu (F. Michael Theilig) writes: > > I found the source an Apple II emulator in C. Since I figgured that > there would be reasonable interest for a port to the Amiga, I decided to > give it a try. It looked like generic C. > > I made a few simple mods and tried to compile. Infinity cubed errors. > The source file is over 100k. My problem is probably one main thing. > There is the declairation char MEMORY [65536]. Guess what that is. Aztek > didn't like that one bit, but I'm sure I can fix that. I don't know about Aztek but Lattice has a limit on arrays of 65533 when you use 16 bit integers and 4294967295 with 32 bit integers. I guess you can do something like this char *MEMORY; MEMORY=AllocMem(65536,MEMF_CLEAR); > > The part I am concerned about is one of them mass assigns. It looks > something like this: MEMORY$F8 [] = { 0,0,0,0,179, ... } The $F8 is new > to me. I imagine that is means start assigning at MEMORY[0xF800] but I > can't be sure. Anyone have any better ideas? That was one of the first problems I had during the port of Abermud. (I still haven't finished the port, but i solved the problem with $) The solution is that the $ is a part of the indentifier and you could discard it without any problems. ( just do it everytime it occurs ) > > Side note: the program was written for and compiled fine on my school's > mini. I can't make heads or tails out of it, but figgured it may find > usefullness on the Amiga. It seems that the Amiga compilers and the Unix compilers have some differences in what's allowed in an identifier. > >/* "Come see the violence inherent in the system!" > > F. Michael Theilig - The University of Rhode Island at Little Rest > GWO110 at URIACC.Bitnet > > "Help! Help! I'm being Repressed!" */ Karl +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | Karl 'Dixie' Hultland | email: d87-khd@sm.luth.se | | University of Lulea | : {uunet,mcvax}!sunic.se!sm.luth.se!d87-khd| | Sweden | Snailmail: Mjolkuddsv. 63-5, S-95157 Lulea Sweden | |=======================| Voice nat: 0920-15479 | | Urbi et Orbi | Voice int: +46 920 15479 | |=============================================================================| | If two people agree on EVERYTHING , one of them is OBSOLETE!! | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++