home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-

New Paste :: Recent Pastes:: No Line Numbers

uni asm stuffz0r! by brendan
    .start main
main:    lw    r1,a        ;get a,b,c and x
    lw    r2,b
    lw    r3,c
    lw     r4,Switches
    jal    xform        ;work out the quadratic
    sw     result,r1    ;Display result
    sw    Lights,r1    ;Store result
    halt            ;Done and done

;;;;; other crap goes here

saveA:    .space    4        ;Just two spaces for use in xform (not for any specific register)
saveB:    .space    4
saveR3:    .space     4        ;Memory address to save our 1/0 register in mult
saveRJ: .space    4
result:    .word    4        ;These are the requires addresses for the assesment
a:    .word    2
b:    .word    7
c:    .word    1
Switches .equ    16#FFFFFFFC
Lights    .equ    16#FFFFFFF8