Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Z80 Assembler/Editor

Reply to topic
Author Message
Chris
  • Guest
Reply with quote
Z80 Assembler/Editor
Post Posted: Thu Jul 29, 1999 6:59 am
In one of my Z80 CPU books, "Pratical Microcomputer Programming: The Z80" it contains source code
to a Z80 assembler & editor written under Z80. I would like to joyfully spend countless hours copying
this source and compiling it for the SMS but before I do I think I need to take some things into
consideration, like:

1) This source code was written in 1978. Are there different versions of the Z80 like there are the
8080 series?
2) The source code was written for old computers that used some sort of punch card feature and worked
via a terminal. Would I have to write some serious changes to the source to make it work with the
SMS VDP? Would I have to create a sprite table and the whole 9 yards just to display the text?
3) If I actually got the assembler/editor to work, how could I save the information? Would I have
to write to the SMS battery or something?

Chris :o)
 
Nyef
  • Guest
Reply with quote
Post Posted: Thu Jul 29, 1999 1:54 pm
Quote
> In one of my Z80 CPU books, "Pratical Microcomputer Programming: The Z80" it contains source code
> to a Z80 assembler & editor written under Z80. I would like to joyfully spend countless hours copying
> this source and compiling it for the SMS but before I do I think I need to take some things into
> consideration, like:

> 1) This source code was written in 1978. Are there different versions of the Z80 like there are the
> 8080 series?

Yes. There's the Z80A and the Z80B, which differ in speed only, There's the Z180, which has an MMU.
There may also be others.

Quote
> 2) The source code was written for old computers that used some sort of punch card feature and worked
> via a terminal. Would I have to write some serious changes to the source to make it work with the
> SMS VDP? Would I have to create a sprite table and the whole 9 yards just to display the text?

You can skip the sprite bit, unless you want to use it for a cursor. And I doubt that you would need to make
serious changes since the book was written in the glory days of "structured programming".

Quote
> 3) If I actually got the assembler/editor to work, how could I save the information? Would I have
> to write to the SMS battery or something?

Nope, just build something to interface an IDE hard drive to the expension connector. :-)

Quote
> Chris :o)

--Nyef
 
Eric
  • Guest
Reply with quote
Post Posted: Thu Jul 29, 1999 4:24 pm
Quote
> 2) The source code was written for old computers that used some sort of punch card feature and worked
> via a terminal. Would I have to write some serious changes to the source to make it work with the
> SMS VDP? Would I have to create a sprite table and the whole 9 yards just to display the text?

The SMS VDP and standard terminal are very different. You would have to write some of your own text output routines and create a "terminal emulator" that runs on the SMS. You would also have to include graphic data for all the ASCII characters. Certainly, though, it could be done.

However, you do understand that what you would be creating is a Z80 assembler that runs ON the SMS. I'm not sure there's a lot of value to this (other than familiaring yourself with Z80 assembly lanugage.) We have Z80 assemblers (technically cross-assemblers) that can assemble and edit Z80 code on our personal computers. Arguably, PC's are much better for that sort of thing than the SMS is.

I'm not saying not to do it. You can do it to learn something, but realize you're probably not creating a useful software tool.

Good luck.

Eric
 
Reply to topic



Back to the top of this page

Back to SMS Power!