Image Map Image Map
Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30

Thread: Z80 Type-In Program Listing

  1. #21
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    27,846
    Blog Entries
    20

    Default

    IIRC, TDL used its own operating system initially; later versions used CP/M. I'm sure those will run under emulation quite well.

  2. #22
    Join Date
    May 2003
    Location
    Back of Burke (Guday!), Australia
    Posts
    2,887

    Default

    Quote Originally Posted by Chuck(G) View Post
    It depends on how you approach the architecture. I don't find the Z80 additions to the 8080 set (let's call them that) to be any more or less orthogonal than the original 8080 set, particularly if you look at them from the viewpoint of the machine language encoding.

    It's notable that DRI never produced an assembler for CP/M that followed the Z80 convention--and users got by just fine. Why the Z80 people needed to resort to using parentheses for indirection baffles me--essentially, they killed off the possibility of expressions using parentheses. Using square brackets would have been a better choice.
    I seem to get by just fine with the Z80 Instructions. I think the point about who owns what is the reasoning why Z80 instructions are different from the 8080.

    Does the 8080 have an alternative register set like the Z80?

  3. #23
    Join Date
    Jan 2014
    Location
    Western North Carolina, USA
    Posts
    1,009

    Default

    Quote Originally Posted by CP/M User View Post
    ...
    Does the 8080 have an alternative register set like the Z80?
    No; this is one of the Z80 additions. The only instruction to actually use the alternate set of BC', DE', and HL' is the EXX instruction, and EX AF,AF' for the accumulator and flags (the 8080 Program Status Word). There is in fact no way to programmatically find out if the current set is the main or the alternate set; the EXX instruction just toggles a flip-flop for the register bank selects (Ken Shirriff's blog entry on the Z80 registers is great reading, and is derived from looking at the actual die via microphotographs; I highly recommend that any vintage Z80 enthusiast should read Ken's posts on the Z80! Also in the vintage vein, Ken is working on a Xerox Alto, which would be some people's vintage dream machine.....). These flip-flops to select the main and alternate sets (as well as the internal addressing of DE and HL in each set, thanks to the EX DE,HL (8080 XCHG) instruction) have no reset line, and so their actual state on chip power-up is undefined.

    Oh, and if you're into such things, look up the 'a-z80' core ; this is built from reverse-engineering the actual silicon and re-implementing it in Verilog in a cycle-accurate manner (at least that was the design goal). So if you just must have a fully accurate Z80 in programmable silicon, you have a couple of choices: T80, and now a-z80. The a-z80 core is designed to pass the rigorous testing of ZEXALL, and ZEXALL is included in the a-z80 repo.

    Ken does a similar analysis of the 8085, again looking at the actual die, and this would be closer to the 8080.

    I know this is veering a bit off-topic for the OP, but the differences between the 8080 and the Z80, documented and undocumented, are fascinating; as I recall, the original Altair BASIC had to have a minor change in flag handling to run on the Z80. And seeing mixed 8080/Z80 mnemonics kindof triggered that for me; I hope the OP doesn't mind.
    Last edited by lowen; July 31st, 2018 at 05:24 AM. Reason: Some minor edits.... too many to enumerate... clarifying some tacit assumptions.....
    --
    Bughlt: Sckmud
    Shut her down Scotty, she's sucking mud again!

  4. #24

    Default

    So I have completed the program listing (Can be found here: https://pastebin.com/SFwwCYQ2) and am now trying to assemble in a CPM emulator with TDL.
    Getting closer at least. Need to put some time into reading the TDL manual, unless anyone can shed some light?


    I>zasm_tdl.com programrom.asm

    TDL Z80 CP/M DISK ASSEMBLER VERSION 2.21

    ????? UNEXPECTED END OF INPUT FILE

  5. #25

    Default

    The good news is that the Source has been re-typed and deramp5113 (aka Mike) has assembled the source with zasm_tdl.
    It builds and the HEX code matches what is in the original listing. He has cleaned up the re-typed source code and at his
    leisure will generate the HEX code for the PROM.

    Plus, he is making some provision for capturing the code for others to have available.

    THANKS.

    Larry

  6. #26

    Default

    A Carriage return is required after the .END directive to mark end of file. The file now compiles (with 3 errors).
    Updated program listing with formatting fixed: https://pastebin.com/Btm4eYay




    Quote Originally Posted by nauseous View Post
    So I have completed the program listing (Can be found here: https://pastebin.com/SFwwCYQ2) and am now trying to assemble in a CPM emulator with TDL.
    Getting closer at least. Need to put some time into reading the TDL manual, unless anyone can shed some light?


    I>zasm_tdl.com programrom.asm

    TDL Z80 CP/M DISK ASSEMBLER VERSION 2.21

    ????? UNEXPECTED END OF INPUT FILE

  7. #27

    Default

    And here is the intel hex.
    https://pastebin.com/zNudnP1B

    ROM burnt - can continue troubleshooting.

    Thanks


    Quote Originally Posted by ldkraemer View Post
    The good news is that the Source has been re-typed and deramp5113 (aka Mike) has assembled the source with zasm_tdl.
    It builds and the HEX code matches what is in the original listing. He has cleaned up the re-typed source code and at his
    leisure will generate the HEX code for the PROM.

    Plus, he is making some provision for capturing the code for others to have available.

    THANKS.

    Larry

  8. #28

    Default

    I have posted the source code keyed in by Larry after some minor editing to make it match the listing shown in the SBC880 manual. The source, listing, and hex files are at:

    http://deramp.com/downloads/mfe_arch...onitor%20PROM/

    I also created a version that will assemble with the MAC assembler from Digital Research with the Z80.LIB macro file.

    Mike

  9. #29

    Default

    Thanks Mike, I was very close. It's a bit hard to keep up with the discussion when all my posts have to be reviewed by a moderator before appearing.
    Anyway, thanks again everyone.

  10. #30

    Default

    nauseous,

    I worked on the source file you posted at https://pastebin.com/SFwwCYQ2. Believe it or not, the "UNEXPECTED END OF FILE" error occurs simply because the file ends without a CR/LF to terminate the last line of the source file (the line with the '.END' directive).

    I corrected a couple of typo's and added two lines that were missing and now your source file generates the same code as Larry's source file after a few edits. At this point, I think we have a good source file recreation as posted at http://deramp.com/downloads/mfe_arch...onitor%20PROM/

    Send me your email address through a PM or directly to deramp5113 followed by ASCII 0x40 followed by the yahoo domain and I'll send you your updated source file if you want it.

    Mike

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
  •