📄 jb8-psu.lst
字号:
008C 249 b_LRxRst equ 1 ; 1= last receive byte
is RESET command
008C 250 b_RxErr equ 4 ; receive error (KBD_IN
routine)
251 *
008C 252 V_RxByte ds 1 ; Rx byte(from KBC)
253 *
008D 254 VC_Parity ds 1 ; 1's counter for parity
check
255 ; (shared by KBD Tx & Rx
Handlers)
256 *
008E 257 Q_KbcCmd ds 2 ; buffer for cmd:data
pair
258 *
259 *
260 * --- KBD PS/2 Serial Tx Handler ------------------------
-----------------
0090 261 V_TxKBD ds 1 ; KBD Tx Status Byte
0091 262 b_TxByte equ 0 ; 1= Tx completed
0091 263 b_TxInt equ 1 ; 1= Tx interrupted by
KBC Tx
264 *
0091 265 V_TxByte ds 1 ; Tx byte(to KBC)
266 *
0092 267 V_LastTx ds 1 ; last Tx byte(for
RESEND cmd)
268
269
270 *
jb8-psu.ASM Assembled with CASM08Z 1/23/2003 9:57:47 PM PAGE 10
271 * --- Repeat Key Handler --------------------------------
-----------------
0093 272 V_RptStat ds 1 ; Repeat Key Status
Register
0094 273 b_Delay equ 0 ; =1 delay count down
in progress
0094 274 b_Repeat equ 1 ; =1 repeat count down
in progress
0094 275 b_RptNow equ 2 ; =1 signal to echo
Repeat Key
276 *
0094 277 V_RptKey ds 1 ; current repeat key
0095 278 V_PKeyNum ds 1 ; previous repeat key
279 *
0096 280 K_TypDef Equ %00101101 ; typematic default
281 ; (500ms and 10.9 char/s)
282 *
0096 283 V_TYPcode ds 1 ; typematic code
284 ; bit 6-5 : repeat
delay code
285 ; 4-0 : repeat
rate code
286 *
0097 287 VC_Repeat ds 1 ; repeat delay/rate
counter [unit:4ms]
288 *
0098 289 V_RPTrate ds 1 ; repeat rate count
[unit:4ms]
290 *
0099 291 V_RPTdly ds 1 ; repeat delay count
[unit:4ms]
292 *
293 *
294 * --- FIFO Buffer Queue ---------------------------------
-----------------
295 * - buffer queue to store KBD scan codes, which will be
sent to KBC
296 *
009A 297 K_FIFO_SIZE equ {16+1} ; Q_FIFO size(reserve 1
byte for separator)
009A 298 Q_FIFO ds K_FIFO_SIZE ; FIFO buffer queue
299 *
00AB 300 VP_FIFOin ds 1 ; i/p ptr for Q_FIFO
00AC 301 VP_FIFOout ds 1 ; o/p ptr for Q_FIFO
302 *
00AD 303 V_FIFOtmp ds 1 ; temp. storage for FIFO
304 *
305 *
306 * --- Scan Codes Buffer Queue ---------------------------
-----------------
307 * - buffer queue to store scan codes for a key #
308 *
00AE 309 K_QC_SIZE equ 10 ; Q_CODE size
00AE 310 Q_CODE ds K_QC_SIZE ; Scan Codes buffer queue
311 *
00B8 312 VP_CDin ds 1 ; i/p ptr for Q_CODE
00B9 313 VP_CDout ds 1 ; o/p ptr for Q_CODE
314 *
jb8-psu.ASM Assembled with CASM08Z 1/23/2003 9:57:47 PM PAGE 11
00BA 315 V_Kcode ds 1 ; key code
316 *
317 *
318 * --- Delay Routines ------------------------------------
-----------------
00BB 319 V_DlyNus ds 1 ; temp. byte in delay
routines
320 *
00BC 321 Q_Fn_Stat ds 16; {K_N_Fn_Keys} ; Fn key
status
322 *
323 *
324 *
00CC 325 PS2RAMEND EQU *
326 * ====== End of PS2 RAM area ============================
================
327
328
jb8-psu.ASM Assembled with CASM08Z 1/23/2003 9:57:47 PM PAGE 12
329 * ------ New I/O Definition -----------------------------
-----------------
330
331 * --- Port A --------------------------------------------
-----------------
00CC 332 Port_Row equ PTA ; Key Matrix - Scan Row 0-7
[o/d]
333 *
334 *
335 * --- Port B --------------------------------------------
-----------------
336 * (Key Matrix - Scan Column 0-7)
[o/d]
337 *
338 * --- Port C --------------------------------------------
-----------------
339 * (Key Matrix - Scan Column 8-16)
[o/d]
340 *
341 *
342 * --- Port D --------------------------------------------
-----------------
00CC 343 b_MseClk equ 0 ; P/S 2 Mouse Clock (not
used)
00CC 344 b_MseData equ 1 ; P/S 2 Mouse Data (not used)
00CC 345 b_LSCRL equ 2 ; -0 SCRLlock LED on
[o/p]
00CC 346 b_LCAP equ 3 ; -0 CAP lock LED on
[o/p]
00CC 347 b_LNUM equ 4 ; -0 NUM lock LED on
[o/p]
348 *
349 *
350
jb8-psu.ASM Assembled with CASM08Z 1/23/2003 9:57:47 PM PAGE 13
351 * ------ Variables Definition ---------------------------
-----------------
352 *
008A 353 org COMRAMEND
354 *
355 * --- [RAM Routine] copy content of VD_Opd1[x] to
VD_Opd2 ----------------
356 * - called in DEV_HANDLER routine
357 * equivalent to : lda <V_OFF_LDA_H:L>,x
358 * sta <V_OFF_STA>
359 * rts
008A 360 Long_IDX equ * ; <for Device Command
Handler>
008A 361 V_LDA ds 1 ; Opcode of LDA(16-bit
Idx) = $D6
008B 362 V_Off_LDA_H ds 1 ; Offset(High byte) LDA
008C 363 V_Off_LDA_L ds 1 ; Offset(Low byte) LDA
008D 364 V_STA ds 1 ; Opcode of STA(direct)
= $B7
008E 365 V_Off_STA ds 1 ; Offset STA
008F 366 V_RTS ds 1 ; Opcode of RTS = $81
367 *
368 *
369 * (dec. by timer Ch1 interrupt - every 4ms)
0090 370 K_EP12_T_OUT equ 30 ; Time out every 120ms
0090 371 VC_EP_T_OUT ds 1 ; Counter for Endpoint
1 & 2 Timeout
372 *
0091 373 KC_1s equ 20 ; dec. by 50ms delay loop
0091 374 VC_1s ds 1 ; counter for 1s delay
375 *
376 *
377 * --- Delay Loops ---------------------------------------
-----------------
378 * DELAY routines using instruction cycles
0092 379 K_Td20us equ 20 ; DLY_20us
loop [us]
0092 380 K_Nd20us equ {K_Td20us*K_Fcpu/1000} ;
[cnts]
381 *
0092 382 K_N5ms equ {5*K_Ftim} ; timer coutns
for 5ms [cnt]
383 *
0092 384 K_N12ms equ {12*K_Ftim} ; timer counts
for 12ms [cnt]
385 *
386 *
387 * --- USB Descriptor Type -------------------------------
-----------------
0092 388 K_DType_DEV equ 1 ; DEVICE
0092 389 K_DType_CFG equ 2 ; CONFIGURATION
0092 390 K_DType_STG equ 3 ; STRING
0092 391 K_DType_IF equ 4 ; INTERFACE -
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -