jdah / jdh-8

An 8-bit minicomputer with a fully custom architecture
MIT License
1.29k stars 89 forks source link

How to print #14

Closed atmeh closed 3 years ago

atmeh commented 3 years ago

How am I supposed to print strings or numbers with the assembly? Do I have to print to the screen or is there a method to print without using the screen module and just printing in the emulator?

Kylogias commented 3 years ago

There is no way to communicate to the emulator "Hey, I want to print TEXT to the console", at least not out of the box. However, you can make a device which handles console IO and use OUTB with that device. Alternatively, you can make a font with code and use the screen device. I'm not sure if you can add devices/modules outside of hardcoding inside of the executable

jdah commented 3 years ago

@Kylogias is correct, please take a look at programs/pong.asm to see how to print to screen.