Example Y86 instructions

These instructions are intended for Hunt's Y86 simulator, which is written in ACL2. If you got here via a search engine and are not in a UTCS course, you're probably looking for the C Y86 simulator, which is different.

(pos 20)
(align 16)
(byte 4)
(data 4294967295) ; -1
(space 6) ; no idea
(nop)
(halt)
(rrmovl %eax %ebx)
(irmovl 4294967295 %eax)
(rmmovl %ebx 0 (%esp)) ; you can't use negative offsets
(mrmovl 4 (%ebp) %ecx)
(addl %eax %edx) ; %edx + %eax -> %edx
(subl %eax %edx) ; %edx - %eax -> %edx
(andl %edx %edx) ; %edx & %edx -> %edx
(xorl %eax %ecx) ; %ecx ^ %eax -> %ecx
(jmp L8)
(jle L8)
(jl L8)
(je L8)
(jne L8)
(jge L8)
(jg L8)
(call L20)
(ret)
(pushl %esi)
(popl %esi)
(leave)

Home

Valid XHTML 1.1!