home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ccut!news.u-tokyo.ac.jp!utnet-news!glocom!wnoc-tyo-news!sranha!cecgw!ainec1!matsuno
- From: matsuno@ainec1.lab.toyodenki.co.jp (MATSUNO Yoshiaki)
- Newsgroups: fj.sys.pc98
- Subject: Re: How to time on pc98
- Message-ID: <matsuno.92Dec24143636@ainec1.lab.toyodenki.co.jp>
- Date: 24 Dec 92 05:36:36 GMT
- References: <T20553.92Dec16133101@maxwell.ee.t.u-tokyo.ac.jp>
- <matsuno.92Dec16205532@ainec1.lab.toyodenki.co.jp>
- <1992Dec21.113027.24325@csce.kyushu-u.ac.jp>
- <N201201.92Dec22234400@hws.ipc.hiroshima-u.ac.jp>
- Distribution: fj
- Organization: TOYO Denki Seizo K.K., Kanagawa, Japan
- Lines: 167
- In-reply-to: n201201@ue.ipc.hiroshima-u.ac.jp's message of 23 Dec 92 17:44:00 JST
-
-
- $@$A$O$d$V$k!w$d$C$Q$j@N(J PC-9801E $@$N(J BIOS $@$rFI$s$@(J $@$G$9!#(J
-
- In article <N201201.92Dec22234400@hws.ipc.hiroshima-u.ac.jp>,
- n201201@ue.ipc.hiroshima-u.ac.jp (n201201) writes:
- > PC9801F$@$N(JBIOS$@$r@NFI$s$@5FCS!w9-EgBg$G$9!#(J
-
- (^_^) $@$?$V$s!$F1$8(J BIOS $@$G$9$M!#%U%m%C%T!<$NH"$NCf$+$i$=$N$H$-$N%G%#(J
- $@%9%"%;%s%V%k%j%9%H!\%3%a%s%H$r8+$D$1$@$7$F$-$^$7$?!#(J1987$@G/$N(J2$@7n$K$J$C(J
- $@$F$^$9$M!#%G%#%9%"%;%s%V%k%j%9%H$r8x3+$9$k$N$O$^$:$$$+$b$7$l$J$$$N$G!$(J
- $@%3%a%s%H$NItJ,$@$1$r$3$N5-;v$N:G8e$KIU$1$F$*$-$^$9!#5?;w%3!<%I$N$h$&$J(J
- $@$=$&$G$J$$$h$&$J!$$G$b!$8+$l$P$o$+$j$^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?$b9MN8$7$J$1$l$P$J$j$^$;$s!#??$NCM$r;;=P$9$k$N$O$[$H(J
- $@$s$IIT2DG=$G$7$g$&!#(J
-
- $@$J$s$K$;$h!$B,Dj$J$j?dDj$J$j$r$7$F$+$i!$=E$$7Z$$$r8@$C$?J}$,!$$*8_$$!$(J
- $@OC$,$7$d$9$/$F$$$$$G$9$M!#(J
- --
- $@!?!@(J *---$@!{(J $@>>Ln!!2EL@(J ( MATSUNO Yoshiaki )
- $@!@!?(J | $@ElMNEE5!@=B$(J($@3t(J)$@5;=Q8&5f=j#A#I8&5f<<(J
- $@!?!@(J *-----------------------------------------------------$@"$(J
-
- ;*********************************************************************
- ;
- ; PC-9801E timer BIOS and timer interrupt handler
- ;
- ; file name : 98timer.txt
- ; date : 1987 Feb.21-23
- ; analysing : Y.Matsuno
- ;
- ;*********************************************************************
- ;
- ;*********************************************************************
- ;
- ; calender / timer BIOS
- ;
- ; INT 1CH
- ; AH <- command BYTE
- ; ES:BX / CX <- command parameters
- ; destroyed registers : none
- ;
- ;*********************************************************************
- ;
- TIMER_BIOS:
- SI <- 0
- DS <- 0
- if (AH0 == 0)
- goto TIMER_BIOS_CAL_READ
- if (AH0 == 1)
- goto TIMER_BIOS_CAL_WRITE;
- if (AH0 == 2)
- goto TIMER_BIOS_TIMER_SET0;
- if (AH0 == 3)
- goto TIMER_BIOS_TIMER_START0;
- ; undefined commands exit
- TIMER_BIOS_EXIT:
- ;
- ;---------------------------------------------------------------------
- ;
- ; command #0
- ; calender data read from uPD1990
-
- $@!&!&!&N,!&!&!&(J
-
- ; ; command(AH) == 2
- TIMER_BIOS_TIMER_SET0:
- JMP TIMER_BIOS_TIMER_SET
- ;
- ;---------------------------------------------------------------------
- ;
- ; ; command(AH) == 3
- TIMER_BIOS_TIMER_START0:
- JMP TIMER_BIOS_TIMER_START
- ;
- ;---------------------------------------------------------------------
- ;
- ; command #1
- ; calender data write to uPD1990
-
- $@!&!&!&N,!&!&!&(J
-
- ;---------------------------------------------------------------------
- ;
- ; command #2, #3
- ; data set up for interval timer interrupt
- ; #2 TIMER_SET initialize timer parameter and
- ; reset PIC mask to start
- ; #3 TIMER_START reset PIC mask to start
- ;
- ; input : (for #2)
- ; ES:BX address of subroutine to be executed when
- ; CA_TIM_CNT (0:58A) reaches at 0
- ; CX timer constant (unit = 10ms), to be written
- ; to CA_TIM_CNT
- ; destroyed registers :
- ; AL
- ; note :
- ; 1. ES:BX is written at INT 7H vector location.
- ; 2. "count zero" routine will be executed by INT 7H.
- ; 3. Command #3 is reentrant.
- ;
- ;---------------------------------------------------------------------
- ;
- TIMER_BIOS_TIMER_START:
- to L1939
- ;
- TIMER_BIOS_TIMER_SET:
- CA_TIM_CNT <- CX
- INT 7H, ES:BX
- AL <- CNT0 | RLLH | MODE3 | BIN
- mode set of PIT
- ;
- L1939:
- if (8MHz) {
- PIT.0 <- 6000H (== 24576)
- }
- else {
- PIT.0 <- 4E00H (== 19968)
- }
- AL <- IMR of master PIC
- reset interval timer's mask
- IMR <- new mask
- to TIMER_BIOS_EXIT
- ;
- ;---------------------------------------------------------------------
- ;
- ; interval timer interrupt handler
- ;
- ;---------------------------------------------------------------------
- ;
- TIMER_HANDLER:
- enable interrupt (?)
- DS <- 0
- if (--CA_TIM_CNT != 0) {
- OCW2 <- nonspecific EOI
- write OCW2 to master PIC
- AH <- TIMER_START
- call TIMER_BIOS
- }
- else {
- AL <- IMR of master PIC
- set mask of 8253
- write new IMR
- OCW2 <- nonspecific EOI
- write OCW2 to master PIC
- execute "count zero" subroutine
- }
- ;
- ;--------------- end of 98timer.txt ----------------------------------
-