Recent Posts
Msx Assembly 101: 06 Printd
This is the next installment in my MSX Assembly 101 serie. We are going to develop here printd routine, which will print the decimal value of the byte is the accumulator.
Comparing to printh (hexadecimal representation) there is and additonal complication: hexadecimal representation always contains two digits (for example, the byte 0x01 is printed as 01, with leading zero); the number of digits in the decimal representation depends on the value of the number:
read more
Msx Assembly 101: 05 Printh
This is another post in the series about Z80 assembly (on MSX).
Previous posts:
Introduction Printz Using YAZE Stack In this post I will describe a creation of routine printh which will print hexadecimal representation of a byte in the accumulator register a.
Setup I am going to make the code which can be compiled both as a cartridge and as a CP/M com file. The setup for this is described in the post Using YAZE and expaned in post Stack.
read more
Msx Assembly 101: 04 Stack
Stack in cartridges According to MSX Technical Handbook, a cartridge software should initialize stack pointer before using the stack. The common practice is to put 0xF380 into sp register (see this) and remember that stack grows downwards.
It means that any cartridge program, which uses the stack, should near its beginning do something like ld sp, 0f380h.
Stack in CP/M programs When a CP/M program starts execution, sp points to the stack of 16 bytes.
read more