Obviously, we did not write all of the preceding code just for fun; we need to write some code for the virtual processor. Since the architecture is very limited and restricted to a specific task, there are not too many options as to what the code may look like:
; Virtual code ; Binary output
vm_code_start:
vm_load_key ; 0x00
vm_load_data_length ; 0x02
vm_nop ; 0x01
.encryption_loop:
vm_load_data_byte register_b ; 0x30 0x01
vm_encrypt register_b ; 0x20 0x01
vm_store_data_byte register_b ; 0x31 0x01
vm_loop .encryption_loop ; 0x10 0xf5 0xff 0xff 0xff
vm_exit ; 0x12