home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / fj / sys / pc98 / 1918 < prev    next >
Encoding:
Internet Message Format  |  1992-12-24  |  6.3 KB

  1. Path: sparky!uunet!ccut!news.u-tokyo.ac.jp!utnet-news!glocom!wnoc-tyo-news!sranha!cecgw!ainec1!matsuno
  2. From: matsuno@ainec1.lab.toyodenki.co.jp (MATSUNO Yoshiaki)
  3. Newsgroups: fj.sys.pc98
  4. Subject: Re: How to time on pc98
  5. Message-ID: <matsuno.92Dec24143636@ainec1.lab.toyodenki.co.jp>
  6. Date: 24 Dec 92 05:36:36 GMT
  7. References: <T20553.92Dec16133101@maxwell.ee.t.u-tokyo.ac.jp>
  8.     <matsuno.92Dec16205532@ainec1.lab.toyodenki.co.jp>
  9.     <1992Dec21.113027.24325@csce.kyushu-u.ac.jp>
  10.     <N201201.92Dec22234400@hws.ipc.hiroshima-u.ac.jp>
  11. Distribution: fj
  12. Organization: TOYO Denki Seizo K.K., Kanagawa, Japan
  13. Lines: 167
  14. In-reply-to: n201201@ue.ipc.hiroshima-u.ac.jp's message of 23 Dec 92 17:44:00 JST
  15.  
  16.  
  17.   $@$A$O$d$V$k!w$d$C$Q$j@N(J PC-9801E $@$N(J BIOS $@$rFI$s$@(J $@$G$9!#(J
  18.  
  19. In article <N201201.92Dec22234400@hws.ipc.hiroshima-u.ac.jp>,
  20.    n201201@ue.ipc.hiroshima-u.ac.jp (n201201) writes:
  21. > PC9801F$@$N(JBIOS$@$r@NFI$s$@5FCS!w9-EgBg$G$9!#(J
  22.  
  23.   (^_^) $@$?$V$s!$F1$8(J BIOS $@$G$9$M!#%U%m%C%T!<$NH"$NCf$+$i$=$N$H$-$N%G%#(J
  24. $@%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
  25. $@$F$^$9$M!#%G%#%9%"%;%s%V%k%j%9%H$r8x3+$9$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M$N<g4Q$J$N$G!$!V(J1$@&L(Js $@L$K~$GLa$i$J(J
  43. $@$1$l$P=E$$!W$H;W$&?M$,$$$F$b$+$^$$$^$;$s$,!#(J
  44.  
  45.   MS-DOS $@4D6-2<$N(J 80386/486 $@$@$H2>A[%b!<%I$GAv$C$F$$$k$3$H$bB?$$$G$7$g(J
  46. $@$&$+$i!$2>A[%b%K%?$b9MN8$7$J$1$l$P$J$j$^$;$s!#??$NCM$r;;=P$9$k$N$O$[$H(J
  47. $@$s$IIT2DG=$G$7$g$&!#(J
  48.  
  49.   $@$J$s$K$;$h!$B,Dj$J$j?dDj$J$j$r$7$F$+$i!$=E$$7Z$$$r8@$C$?J}$,!$$*8_$$!$(J
  50. $@OC$,$7$d$9$/$F$$$$$G$9$M!#(J
  51. --
  52.       $@!?!@(J      *---$@!{(J     $@>>Ln!!2EL@(J ( MATSUNO Yoshiaki )
  53.       $@!@!?(J      |        $@ElMNEE5!@=B$(J($@3t(J)$@5;=Q8&5f=j#A#I8&5f<<(J
  54.       $@!?!@(J      *-----------------------------------------------------$@"$(J
  55.  
  56. ;*********************************************************************
  57. ;
  58. ;       PC-9801E timer BIOS and timer interrupt handler
  59. ;
  60. ;       file name       : 98timer.txt
  61. ;       date            : 1987 Feb.21-23
  62. ;       analysing       : Y.Matsuno
  63. ;
  64. ;*********************************************************************
  65. ;
  66. ;*********************************************************************
  67. ;
  68. ;       calender / timer BIOS
  69. ;
  70. ;       INT 1CH
  71. ;               AH              <- command BYTE
  72. ;               ES:BX / CX      <- command parameters
  73. ;       destroyed registers : none
  74. ;
  75. ;*********************************************************************
  76. ;
  77. TIMER_BIOS:
  78.         SI <- 0
  79.         DS <- 0
  80.         if (AH0 == 0)
  81.             goto TIMER_BIOS_CAL_READ
  82.         if (AH0 == 1)
  83.             goto TIMER_BIOS_CAL_WRITE;
  84.         if (AH0 == 2)
  85.             goto TIMER_BIOS_TIMER_SET0;
  86.         if (AH0 == 3)
  87.             goto TIMER_BIOS_TIMER_START0;
  88.         ; undefined commands exit
  89. TIMER_BIOS_EXIT:
  90. ;
  91. ;---------------------------------------------------------------------
  92. ;
  93. ;       command #0
  94. ;       calender data read from uPD1990
  95.  
  96.         $@!&!&!&N,!&!&!&(J
  97.  
  98. ;       ; command(AH) == 2
  99. TIMER_BIOS_TIMER_SET0:
  100.         JMP TIMER_BIOS_TIMER_SET
  101. ;
  102. ;---------------------------------------------------------------------
  103. ;
  104. ;       ; command(AH) == 3
  105. TIMER_BIOS_TIMER_START0:
  106.         JMP TIMER_BIOS_TIMER_START
  107. ;
  108. ;---------------------------------------------------------------------
  109. ;
  110. ;       command #1
  111. ;       calender data write to uPD1990
  112.  
  113.         $@!&!&!&N,!&!&!&(J
  114.  
  115. ;---------------------------------------------------------------------
  116. ;
  117. ;       command #2, #3
  118. ;       data set up for interval timer interrupt
  119. ;               #2      TIMER_SET       initialize timer parameter and
  120. ;                                      reset PIC mask to start
  121. ;               #3      TIMER_START     reset PIC mask to start
  122. ;
  123. ;       input : (for #2)
  124. ;               ES:BX   address of subroutine to be executed when
  125. ;                      CA_TIM_CNT (0:58A) reaches at 0
  126. ;               CX      timer constant (unit = 10ms), to be written
  127. ;                      to CA_TIM_CNT
  128. ;       destroyed registers :
  129. ;               AL
  130. ;       note :
  131. ;       1. ES:BX is written at INT 7H vector location.
  132. ;       2. "count zero" routine will be executed by INT 7H.
  133. ;       3. Command #3 is reentrant.
  134. ;
  135. ;---------------------------------------------------------------------
  136. ;
  137. TIMER_BIOS_TIMER_START:
  138.         to L1939
  139. ;
  140. TIMER_BIOS_TIMER_SET:
  141.         CA_TIM_CNT <- CX
  142.         INT 7H, ES:BX
  143.         AL <- CNT0 | RLLH | MODE3 | BIN
  144.         mode set of PIT
  145. ;
  146. L1939:
  147.         if (8MHz) {
  148.              PIT.0 <- 6000H (== 24576)
  149.         }
  150.         else {
  151.              PIT.0 <- 4E00H (== 19968)
  152.         }
  153.         AL <- IMR of master PIC
  154.         reset interval timer's mask
  155.         IMR <- new mask
  156.         to TIMER_BIOS_EXIT
  157. ;
  158. ;---------------------------------------------------------------------
  159. ;
  160. ;       interval timer interrupt handler
  161. ;
  162. ;---------------------------------------------------------------------
  163. ;
  164. TIMER_HANDLER:
  165.         enable interrupt (?)
  166.         DS <- 0
  167.         if (--CA_TIM_CNT != 0) {
  168.             OCW2 <- nonspecific EOI
  169.             write OCW2 to master PIC
  170.             AH <- TIMER_START
  171.             call TIMER_BIOS
  172.         }
  173.         else {
  174.             AL <- IMR of master PIC
  175.             set mask of 8253
  176.             write new IMR
  177.             OCW2 <- nonspecific EOI
  178.             write OCW2 to master PIC
  179.             execute "count zero" subroutine
  180.         }
  181. ;
  182. ;--------------- end of 98timer.txt ----------------------------------
  183.