On the Subject of 6-Bit Assembly
Thought Markscript was tedious? Check this thing out! Well, at least it has a lot more commands...
This module uses ☼## to show its bytes as opposed to $## as usual. Every byte is 6 bits and every word is 2 bytes.
This module consists of 3 screens: Data screen, Command screen, Binary screen; and 2 buttons: 0 and 1.
Initially, the data screen shows 64 bytes of the DATA block as 64 bytes of the COLOR block. COLOR is immutable.
Pressing the Binary screen will show you the PROG0 block, whopping 64 words of memory for your very own program! That’s not enough for you? Don’t worry! Pressing the Binary screen when the current input is 1 will send you to the other program block, because there’s two of them. There’s also PROG1 - another 64 words!
To go back to DATA, press Binary when the input is empty. To clear the input - press Command. However, if you try to clear the input that is already empty, you will change insertion mode (INSERT/REPLACE), default being REPLACE. To delete the command at the cursor, press Binary when the input is 0. To run the code, press Command when seeing DATA. To stop running, press Command again.
Your goal is to write some code that not only successfully completes the task, but also safely stops the CPU
by going into an infinite loop (the easiest solution for that is RJMP ☼00 in the place where you want to finish the program).
Remember that if CPU goes out of the either block or meets an unknown opcode, the module will strike. Those are the only 2 cases of module striking.
THIS MEANS THAT CPU IS NOT GOING TO AUTOMATICALLY JUMP TO PROG1 IF IT GOES BEYOND ☼77 AT PROG0!
Tasks
Tasks require some parameters. R* means register with some number (R0-R7), A* means address (☼00-☼77), V* means constant value (☼00-☼77), N* also means some constant, it’s ☼00-☼77 unless stated otherwise.
Data[A*] means the byte of DATA at address A*. All values mentioned in a statement are the initial ones (before the program runs), unless stated otherwise. Ranges of bytes wrap around: the byte after ☼77 is ☼00.
*a means that the value is taken from first byte of task info, *b - from second byte, *c - from third, ..., *g - from seventh. Zeroth byte is the task number (0 - <number of tasks - 1>)