Image Map Image Map
Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Z80 Assembler help please

  1. #11

    Default

    There's a few of those:

    Code:
    LD      HL,(TRKBUF+0FFH) AND 0FF00H
    LD      A,-((TRKLEN SHR 8) + 1) AND 0FFH
    LD      BC,(SCLEN-2)/2
    ORG    ($+255) AND 0FF00H
    Maybe I should've left it at 8080 code and used the ANI instruction you told me about the other day that can replace BIT in Z80 parlance.

    Thanks for the help.
    www.binarydinosaurs.co.uk - UK home computer history
    Where RIFA capacitors come to die
    facebook.com/binarydinosaurs

  2. #12

    Default

    I often use a set of macros to implement Z80 instructions, and use Intel mnemonics. this one dates back to the 1980's and does not include all Z80 instructions but does cover most. It's mainly a matter of preference, but you don't have to switch to Zilog mnemonics just to use Z80 instructions.

    z80.lib.txt

  3. #13

    Default

    As usual with some of my restorations it's a steep learning curve to preserve things which I try not to forget afterwards so anything that I can add to my assembling tools for futures is most welcome, thanks! The Sorcerer may be the only hard sectored machine I ever have to try and keep running unless I end up with another RX01 powered DEC machine or a Northstar Horizon/SOL-20 etc. For most soft sectored machines I can read their floppies using my imaging PC. I first toyed with Z80 assembler back in ZX Spectrum days here in the UK but work got in the way and I never progressed.
    www.binarydinosaurs.co.uk - UK home computer history
    Where RIFA capacitors come to die
    facebook.com/binarydinosaurs

  4. #14
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    28,873
    Blog Entries
    20

    Default

    You may want to consider using DRI MAC and their Z80.LIB, which gives you most of the Z80's capabilities in Intel 8080 assembler form, but that still leaves you with a bunch of strange mnemonics to learn.

    I used an 8080-to-z80 conversion package from Sorcim, but I don't know if I hung onto it.

    Basically the best thing is just to grit your teeth and learn both syntaxes or use the 8080 one if you don't need the Z80 instructions.

    Life is stupidly complicated sometimes.

  5. #15

    Default

    Basically the best thing is just to grit your teeth and learn both syntaxes or use the 8080 one if you don't need the Z80 instructions


    My teeth were gritted quite a while ago

    The only Z80 instruction I thought I needed was BIT but I got around that with your suggestion and testing in an emulator. The program in 8080 is now back to where I was the other day with drive activity and the head stepping nicely from track 0 but malformed packets being sent to the PC. I need to learn how to display the values its worked out for the amount of RAM its reserved and what it's using for Track number/sector number etc.
    www.binarydinosaurs.co.uk - UK home computer history
    Where RIFA capacitors come to die
    facebook.com/binarydinosaurs

  6. #16

    Default

    OK I'm getting there slowly. If I try and use the Sorcerer's built in SEND and RECEVE hooks it doesn't work. There was an addendum with Monitor 1.1 that allowed better RS232 access and it changed the INTAPE and OUTAPE routines to use RS232 if 'SE T=2' or 'SE T=3' was in effect.

    But! Receiving bytes seems problematical. I changed the sending side of things slightly and now get fully formed XMODEM packets being sent to the receiving PC which is sending ACKs in response, but despite the Sorcerer receiving the initial 'C' from the PC to enable CRC checking mode and start the transfer it doesn't receive the ACKs so keeps sending the same packet until the receiver gives up.

    Later today I'll drop the baud rate to 300 just to see if it makes a difference in what gets sent over, but at 1200 the PC is happy enough to send ACKs back meaning it recognises the packet, and I have a serial monitor running on the PC that dumps everything sent into or out of the COM port which shows consistency and a recognisable XMODEM packet.

    So close...
    www.binarydinosaurs.co.uk - UK home computer history
    Where RIFA capacitors come to die
    facebook.com/binarydinosaurs

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •