1+2.s

My second SPARC assembly program: Adds one and two, and puts the result in its return code.

.global main
main:
    mov 1,%l0
    mov 2,%l1
    add %l0,%l1,%l0
    mov %l0,%o0
    mov 1,%g1
    ta 0     ! they didnt teach us this in the book

My first SPARC assembly program:

[jauricch@ieng6] % ./a.out
Illegal instruction (core dumped)

Comments are closed.

Just another WordPress weblog