Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
First of all, there is no such instruction on Intel processors as "move an immediate value into the SS register", thus that error. Do something like this instead:
As far as your undefined reference and your phase error, you didn't list the code where you define the reference, so we can't possibly say for sure what the problem is. However, although labels can be forward referenced, equates cannot, IIRC. Is it possible that's your problem?
.empty_8042_loop:
dec cx
jz .empty_8024_end_loop ***
mov dx, 064h
in al, dx
test al, 01h
jz .no_output
mov dx, 064h
in al, dx
jmp .empty_8042_loop
.no_output:
test al, 02h
jnz .empty_8042_loop
.empty_8042_end_loop:
pop cx
ret
And I don't know what to give you for the phase thing? It just points me to the last line in the boot loader, which I gave in my OP.
You need to make a far jump, setting CS to the value for your code segment. Since you want a 32-bit jump offset from 16-bit code, you need a "jmp dword". You then need to load all of the other segment registers. Eg