![trs80 emulator mac trs80 emulator mac](http://cpmarchives.classiccmp.org/trs80/mirrors/www.vavasour.ca/jeff/images/coco2.gif)
- #Trs80 emulator mac how to#
- #Trs80 emulator mac manual#
- #Trs80 emulator mac code#
- #Trs80 emulator mac series#
Then, it decrements the BC register pair by 1 and if BC is not zero, it will increment HL and DE repeat the load-from-HL / store-at-DE / dec BC operation until BC reaches zero. LDIR is a block-memory move command that begins by taking the byte at the address held in the HL register pair and stores it at the address in the DE register pair. The major work is performed by a Z-80 instruction called LDIR ( LoaD-Increment-Repeat ). This little routine is relocatable it can be placed anywhere in memory because it does not internally depend on addresses within itself. The first line is the ORiGin directive that tells the assembler ( the program that translates assembly-language to machine-language ) what address we plan on starting at. The equivalent assembly language program usually looked something like this: To see what the program was doing, the BASIC equivalent was easy enough to understand:Īs the program ran, each character position on the screen would fill with a white block:
#Trs80 emulator mac code#
This was done by storing a character with the ASCII code 191 at each location in the machine’s video memory ( located at locations 15360 to 16383 inclusively.
#Trs80 emulator mac manual#
One of the machine-language subroutines that was presented in the Radio Shack Level II BASIC manual was a simple routine that would fill the screen with white space. This revelation enabled me to tinker a little with some of the subroutines presented. I found that by converting those hex codes to decimal, I would see the same numbers in the DATA statements for the BASIC loader for the particular routine. He would present the assembly listing for the machine-language routine complete with hex codes by each mnemonic. Most of his programs were very compact and were wonderful to study.
![trs80 emulator mac trs80 emulator mac](https://i.ytimg.com/vi/MgN-EGDRqIA/hqdefault.jpg)
Brothers would present some sort of a short program in assembly-language ( the human-readable syntax that is then assembled into machine-language. This column was a tutorial on machine-language in a sort of cookbook approach.
![trs80 emulator mac trs80 emulator mac](http://cpmarchives.classiccmp.org/trs80/mirrors/www.vavasour.ca/jeff/screens/coco2.gif)
I began reading Hardin Brothers’ 80 Micro column The Next Step. The only thing I was really lacking at this point, was learning machine-language itself. I also became very comfortable with hexadecimal notation and conversion to and from decimal notation. I began to grow comfortable with the conversion routine … dividing by 256 to get the high-byte and taking the remainder to get the low-byte. The address of the routine had to be broken down into two bytes, the least-significant-byte first.
#Trs80 emulator mac series#
Authors usually placed these bytes in a series of DATA statements and used the READ command to read each one in a loop.Īfter the subroutine was placed in memory, the last task was to point the USR() function to the routine. ) After that, you had to POKE your machine-language routine into reserved memory a byte at a time. ( Note: there are ways of getting around this that I’ll explain in a future post. In order to execute machine-language from BASIC, you had to first reserve some space at the top of BASIC at the MEMORY SIZE? when the computer powered up.
#Trs80 emulator mac how to#
All of the good games from Big Five seemed to be written in machine-language.Īs I kept poring through the backlog of issues of 80 Micro, I learned how to use little machine-language subroutines via the USR() function. I had known that if I wanted to write games, I was going to have to code using some mysterious black art known as machine-language. I had been familiar with BASIC for a couple of years, but only some of the more simple aspects. I did so by typing in programs from the books and by trying to write my own. My first task was to really try to learn BASIC. My eldest brother had his own TRS-80, so he let me borrow from his vast library of 80 Micro magazines as well. The computer was purchased at an auction and came with a fair amount of books on BASIC including many that just contained BASIC games. My goal? Like many kids my age at the time, I had intended to write a video game or two and live happily on the riches that would befall me. I was 17 years old when I received this computer in the Fall of 1982. My first computer was a second-hand TRS-80 Model I with 16K of RAM and a cassette-recorder for auxiliary storage.