! ! utils.s Miscelaneous low level routines. ! !********************************************************************** ! ! Peek and Poke in alternate address space. ! !********************************************************************** .seg "text" .global _io_peek _io_peek: ! ! %o0 holds address. Access IO alternate space ! returns value in %o0 ! srl %o0, 2, %o0 sll %o0, 2, %o0 ! makes sure the access is word aligned lda [%o0] 0x80, %o0 retl nop .global _io_poke _io_poke: ! ! %o0 holds address %o1 holds value. Access IO alternate space ! srl %o0, 2, %o0 sll %o0, 2, %o0 ! makes sure the access is word aligned sta %o1, [%o0] 0x80 retl nop !********************************************************************** ! ! Trap 0x40 to enter the debugger. ! !********************************************************************** .seg "text" .global _Trap0x40 _Trap0x40: ta %g0 + 0x40 nop retl nop