Subversion Repositories Shiroi

Rev

Blame | Last modification | View Log | Download | RSS feed

; $Id: io.asm 22 2024-08-31 10:44:32Z nishi $

        .area   _CODE
;
; ret=inp(port addr)
;
_inp::
        ld      hl,#2
        add     hl,sp
;
        ld      c,(hl)
        in      a,(c)
;
        ld      l,a
        ld      h,#0
;
        ret
;
; outp(port addr,param)
;
_outp::
        push bc
        ld      hl,#4
        add     hl,sp
;
        ld      c,(hl)
        inc     hl
        ld      b,(hl)
        out     (c),b
;
        pop     bc
        ret