- How do I use the 0x42c Kernel?
First include the kernel jump table in your source code by using the assembler directive .include "kern_jumptable.dasm16"
. For this to work you need to ensure the kernel jumptable file is in the same directory as your source file.
Then, when you want to use a kernel routine, set the appropriate registers to the parameters using the overview below and run the JSR instruction (jump to sub-routine), passing the address of the desired routine from the jump table. For example:
:hello dat "Hello, World!", 0
set a, hello
jsr [kern_printnl]
- It won't assemble!
Make sure you're using noname22's assembler
Compares two strings, sets A to 0 if they are equivalent
A | The first string
B | The second string
Checks whether the first string starts with the second string, sets Y to 0 if it does.
A | The first string
B | The second string
Sets A to the length of the given string
A | The string to check the length of
Concatenates two strings
Prints a string
A | String to print
Prints a string followed by a new line
A | String to print
Prints a character
A | Character to print
Prints a new line