Subversion Repositories Shiroi

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
22 nishi 1
; $Id: io.asm 22 2024-08-31 10:44:32Z nishi $
2
 
3
	.area	_CODE
4
;
5
; ret=inp(port addr)
6
;
7
_inp::
8
	ld	hl,#2
9
	add	hl,sp
10
;
11
	ld	c,(hl)
12
	in	a,(c)
13
;
14
	ld	l,a
15
	ld	h,#0
16
;
17
	ret
18
;
19
; outp(port addr,param)
20
;
21
_outp::
22
	push bc
23
	ld	hl,#4
24
	add	hl,sp
25
;
26
	ld	c,(hl)
27
	inc	hl
28
	ld	b,(hl)
29
	out	(c),b
30
;
31
	pop 	bc
32
	ret
33