🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.sys.pc98
Article #288

Re: Q. on using timer IC

#288
From: Kenichi Okuyama
Date: Thu, 27 Aug 1992 13:05
77 lines
2278 bytes
In article <gcmVU.yoshimi@etl.go.jp> yoshimi@etl.go.jp (Takashi Yoshimi) writes:
 >public laptime, outcount, loopc0, loopc1, qtimer
 >laptime proc near
 >	  pusha
 >	  push ds
 >	  push es
 >	  push ss
 >	  mov bp, sp

$@3d$j9~$_$,$+$+$kD>A0$K<B9T$5$l$F$$$?%W%m%0%i%`$,(J
$@<+J,<+?H$@$1$H$O8B$i$J$$!#%^%&%9%I%i%$%P!<$d(J
$@%-!<%I%i%$%P!<!"(JHD $@%I%i%$%P!<$@$C$?$i!"$I$3$K2?$r=q$-$K$$$/$+(J
$@$o$+$i$J$$!#$@$+$i!"JQ?t$O(J CS $@AjBP$K$9(J$@$k$+!"(JDS $@$r2?$H$+$7$F(J
$@3P$($F$*$/$+!"$I$A$i$+$7$+$J$$!#$3$N>l9g$O!"(JDS $@AjBP$NJQ?t$,(J
$@7k9=B?$=$&$J$N$G(J CS $@AjBP$N>l=j$K(J DS $@$NCM$r5-O?$7$F$*$/!#(J
;
; set DS so that hard_int_routine will know it.
;
	mov	ax,ds
	mov	CS:[Data_Segment],ax


$@!J#4#09T$[$I>JN,!K(J
 >	  sti
 >	  ;
 >	  pop ss
 >	  pop es
 >	  pop ds
 >	  popa
 >	  ret
 >	  ;

Data_Segment:	DW	0

;$@?=$7Lu$J$$$,!"A4It=q$-D>$9!#(J
hard_int_routine:
	cli
	pushf
	push ax
	push bx
	push ds

;$@$H$j$"$($:!"(Jds $@$r$3$N3d$j9~$_%W%m%0%i%`$N$=$l$K9g$o$;$k!#(J
	mov	ax,word ptr CS:[Data_Segment]
	mov	ds,ax

;$@$3$A$i$NJ}$,Aa$$!#(J
	dec	incount
	jnz	recover

	mov	ax,loopc1
	mov	incount,ax
	mov	bx,offset ds:outcount
; 4 $@%P%$%HJQ?t$r2C;;$9$k$J$i!"$3$A$i$NJ}$,(J
; $@<B9TB.EY$,0BDj$7(J$@$F$$$k$7!"Aa$$!#(J
	add	word ptr ds:[bx],1
	adc	word ptr ds:[bx+2],0

recover:
	mov	al,20H
	out	00,al
	pop	ds
	pop	bx
	pop	ax
	popf
	sti
	iret

laptime endp
-----

$@$b$7$+$7$?$i!"%"%;%s%V%iL?Na$,!J%K!<%b%K(J$@%C%/$G$O$J$/!K4V0c$C$F$$$k$+(J
$@$bCN$l$J$$!#:G6a$O(J lsic86 $@$N(J r86 $@MQ$N%3!<%I$7$+AH$s$G$$$J$$$N$G!#(J
--
	$@1|(J$@;3(J $@7r0l!wEl5~4pAC8&5f=j!%F|K\#I#B#M!J3t!K(J

	BGM: "$@G<NC(J"	by TUBE		$@!D(J $@2F$@$M$'!#(J
Technical Details
Message-ID: <OKUYAMA.92Aug27220517@nasu.trl.ibm.co.jp>
Path: arc1-ca.pugleaf.net!sparky!uunet!ccut!trla!trltsc!fuji!junet-news.trl.ibm.com!okuyama
References: <gcmVU.yoshimi@etl.go.jp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ccut!trla!trltsc!fuji!junet-news.trl.ibm.com!okuyama
From: okuyama@trl.ibm.co.jp (Kenichi Okuyama)
Newsgroups: fj.sys.pc98
Subject: Re: Q. on using timer IC
Message-ID: <OKUYAMA.92Aug27220517@nasu.trl.ibm.co.jp>
Date: 27 Aug 92 13:05:17 GMT
References: <gcmVU.yoshimi@etl.go.jp>
Sender: okuyama@trl.ibm.com (Kenichi Okuyama)
Distribution: fj
Organization: IBM Research, Tokyo Research Laboratory
Lines: 77
In-reply-to: yoshimi@etl.go.jp's message of 26 Aug 92 04:54:26 GMT