From: Felipe M. P. <fel...@ic...> - 2002-08-21 06:42:22
|
I am using. But not in production. I'm using on the simulator. If you want to exchange some ideas, I'm here. With respect to assembly inlining, you could take a look at library routines. They are written in pure assembly. Maybe you could implement a library extension in assembly. It's at sdcc/device/lib/z80 or something like. greetings, Felipe On Wed, 21 Aug 2002, Peter Townson wrote: > Thanks for the input guys. > > I have tried Arrons suggestion and as expected it did not pan out. > Rod is quite correct in his summation of Z80 ports. > > If I understood sufficient of the mechanisms of the optimizer, the inlining > mechanism and macros I should be able to make a set of macros or inlined > funcitons that emulate the old TurboC (dos) inportb and outportb functions > using asmembly. The trouble with this is that I have not been able to find > the majik incantation that makes inlined asms work within macros (#defs). > > I'm rather hoping some-one will take pity on me and show me how this is > done. > > Tar > > Peter T > > PS: I'm somewhat surprised at the low level of responses - Is noone using > the Z80 Port ?? > > -----Original Message----- > From: Rod Boyce [mailto:rod...@st...] > Sent: Saturday, 10 August 2002 12:22 AM > To: sdc...@li... > Subject: RE: [Sdcc-user] z80 port questions > > > I'm sure this wont work on the Z80 as the Z80 has two separate memory maps > 64K for ROM and RAM and 64K for IO it uses a separate control line to the > addressing and everything. If you IO was memory mapped you maybe able to > use a similar mechanism. I think if I remember my Z80 Peter is looking or > an inp or outp assembly instruction similar to the 80x86 instructions. I > will dig up what I have at home and play with this to see if I can get > anything to work. > > > Regards, > Rod Boyce > > -----Original Message----- > From: Aaron [mailto:aa...@bo...] > Sent: Thursday, August 08, 2002 5:29 PM > To: Peter Townson > Cc: sdc...@li... > Subject: Re: [Sdcc-user] z80 port questions > > Peter, > > I'm not familiar with the Z80 port (actually just getting started with SDCC > with the PIC port), but I'd guess that you are looking for the 'sfr' > command. > > Example: > > sfr at 0x0006 PORTB; > > For the pic16F877, this references the output port A, which just happens to > be memory mapped to the register at 0x0006. Once you've defined something > like this, you can do 'PORTB=0x55;' in the code somewhere and have it > happen. > > Likely you'll want a header file with all the registers of your processor > all laid out with sfr commands so that you have easy access to everything. > > Hopes this helps... and hope that I'm right. <grin> > > Aaron > > On Fri, 9 Aug 2002 08:10:16 +1000 Peter Townson <PTo...@ta...> > wrote: > > > Hi, > > I'm looking for some basic information about using the Z80 port of SDCC. > > > > Is there a high level method to access the Z80 port space ? ie in C syntax > > rather than assembler (yes I know that this does not fall within the ANSI > > standard). > > > > I have looked for such library funcitons of inp() & outp() but did/could > not > > find 'em. > > > > I have tried searching though the existing documentation without sucess > > (there being very little about the Z80 port). > > > > I have attempted to use the 'ultimate documentation' method of reading the > > code without sucess. > > > > Similarly, I have had very little sucess in attempts to define macros with > > inlined-assembler to fullfill these functions. > > > > To re-iterate, I'm looking for the 'correct' method of achieving port > access > > with SDCC's z80 port. > > > > Any and all help would be appreciated. > > > > Peter Townson :-> |