I'm reading the textbook Computer Systems 4th Edition. The question below is in the context of the Pep/8 virtual computer. In the exercises I am given this question:
Convert the following assembly language pseudo-ops into hexadecimal machine language:
- .ASCII "Bear\x00"
- .BYTE 0xF8
- .WORD 790
I am trying to get these values converted to hex, but I cannot understand my textbook's explanation of the process, and I don't feel the book gives much of an explanation.
For the first answer I think it is a simple lookup in an ASCII conversion table:
42 65 61 72 00
The answers for this exercise are as follows:
- 42 65 61 72 00
- F8
- 0316
Despite knowing these answers I have no idea how to get the answers for 2 and 3
Here is the download link for the Pep/8 assembler and simulator. Here is the source code for the assembler.