📄 dcm44d.a51
字号:
$TITLE (iDCM 44 COMMUNICATIONS FIRMWARE: POWER-UP DIAGNOSTICS MODULE)
$DATE (8 AUGUST 86)
$NOMO
$PAGING
$REGISTERBANK(0)
;***************************************************************************
;*
;* TITLE: iDCM 44 COMMUNICATIONS FIRMWARE: POWER-UP DIAGNOSTICS
;*
;* RELEASE: 2.0
;*
;* DESCRIPTION: THIS MODULE CONTAINS THE POWER-UP DIAGNOSTICS PROCEDURE
;*
;* UPDATES:
;*
;***************************************************************************
;*
;* COPYRIGHT 1983, 1986 INTEL CORPORATION
;*
;* INTEL CORPORATION PROPRIETARY INFORMATION. THIS LISTING
;* IS SUPPLIED UNDER THE TERMS OF A LICENSE AGREEMENT WITH
;* INTEL CORPORATION AND MAY NOT BE COPIED NOR DISCLOSED
;* EXCEPT IN ACCORDANCE WITH THE TERMS OF THAT AGREEMENT.
;*
;***************************************************************************
NAME DCM44D
$INCLUDE(REG44.PDF)
USING 0
CHKSUM EQU NOT (02Bh) ; R2.1 checksum
MAXADR EQU 4095
MAXRAM EQU 0C0H
MINRAM EQU 2H
MAXMEM EQU 7FH
MAXPAGE EQU 3H
RED_LED_BIT EQU 090H
GRN_LED_BIT EQU 091H
EXTRN CODE (req_init)
DCMFW_DIAG_CODE_SEG SEGMENT CODE
DCMFW_CODE_FILL_SEG SEGMENT CODE
;***************************************************************************
;*
;* SETUP OF RESET VECTOR
;*
;***************************************************************************
CSEG AT 0
LJMP Instruction_Set_Test
;***************************************************************************
;*
;* SETUP OF CHECK SUM VALUE
;*
;***************************************************************************
CSEG AT 00FFFH
PUBLIC dcm_cksum
dcm_cksum: DB CHKSUM
;***************************************************************************
;*
;* FILLER AREA FOR PROM/ROM
;*
;***************************************************************************
RSEG DCMFW_CODE_FILL_SEG
%SET(EMPTY_BYTES, (0fd6h+19h))
%WHILE (%EMPTY_BYTES NE 0FFFH)
(
%SET(EMPTY_BYTES, %EMPTY_BYTES+1)
DB 00H
)
;***************************************************************************
;*
;* DIAGNOSTIC CODE
;*
;***************************************************************************
RSEG DCMFW_DIAG_CODE_SEG
$EJECT
;***************************************************************************
;*
;* PROCEDURE: INSTRUCTION_SET_TEST
;*
;* PURPOSE: Test Instruction Set Operation
;*
;* CALLED FROM: None
;*
;* ENTERED FROM: System Reset
;*
;* CALLS: None
;*
;* ENTERS: ROM_TEST
;*
;* INPUTS: None
;*
;* MODIFIES: None
;*
;* DESTROYS: A
;* B
;*
;* RETURNS: Nothing
;*
;* DESCRIPTION: Tests Instruction Set
;*
;* This section ends with the Red LED on and the green
;* LED on indicating internal portion of 8044 tests OK
;*
;* REGISTER BANK: 0
;*
;***************************************************************************
instruction_set_test:
CLR GRN_LED_BIT ;turn off green led
CLR RED_LED_BIT ;turn off red led
MOV PSW, #04H ;Set OV
MOV A, #0FFH
MOV R0, PSW
CJNE R0, #04H, power_up_error
;This checks parity bit too
ADD A, #01H
ANL C, /OV
ANL C, AC
JNC power_up_error ;Check CY,AC,OV Operation
ANL A, #0FFH ;Check AND Function
ORL A, #0AAH ;Check OR Function
RLC A
RLC A ;A = ABH, CY = 0
CJNE A, #0ABH, power_up_error
JNB P, power_up_error ;Check Parity Bit
RRC A ;A = 55H, CY = 1
SUBB A, #50H ;Check Subtract, A = 04H
MOV B, #12H
MUL AB
MOV B, #24H
DIV AB ;A=02, B=00
CJNE A, #02H, power_up_error
MOV A, B
CJNE A, #00H, power_up_error
SETB GRN_LED_BIT ;turn on green led
SETB RED_LED_BIT ;turn on red led
$EJECT
;***************************************************************************
;*
;* PROCEDURE: ROM_TEST
;*
;* PURPOSE: Validate (P)ROM contents
;*
;* CALLED FROM: None
;*
;* ENTERED FROM: Instruction_Set_Test
;*
;* CALLS: None
;*
;* ENTERS: INTERNAL_RAM_TEST
;*
;* INPUTS: None
;*
;* MODIFIES: A, DPTR
;*
;* DESTROYS: DPTR
;* A
;* R0
;* R1
;* R2
;* R3
;*
;* RETURNS: Nothing
;*
;* DESCRIPTION: This method gets data for exclusive OR by getting low addr 00 first
;* and the going to low addr 0FFH and then 0FEH etc till 01H is reached.
;* at this time the upper addr byte is decremented and the process repeated
;* on the low address.
;*
;* Register Usage:
;* DPTR - pointer to memory location;*
;* A - pointer to low byte of DPTR
;* R0 - location to store exclusive or checksum
;* R1 - location to store final DPH value
;*
;* This section ends with the Red LED on and the green
;* LED off indicating internal portion of 8044 tests OK
;*
;* REGISTER BANK: 0
;*
;***************************************************************************
rom_test:
MOV PSW, #0 ;Clear PSW and set for register bank
; 0, flag 0 = 0
MOV DPTR, #MAXADR ;Initialize to maximum internal
; ROM address
MOV R0, #00H
MOV R1, DPL
MOV R2, DPH
;
; EXCLUSIVE OR CHECKSUM LOOP
;
rt_loop:
CLR A
MOV DPL, R1
MOV DPH, R2
MOVC A, @A+DPTR ;get new data byte from ROM
XRL A, R0 ;Exclusive OR new data with checksum
MOV R0, A
DEC R1
CJNE R1, #0FFH, rt_loop ;Point to next addr.
DEC R2 ;decrement data pointer - high byte
CJNE R2, #0FFH, rt_loop ;Stop after address 0 has been tested
CJNE R0, #0FFH, power_up_error
;Is checksum correct?
CLR GRN_LED_BIT ;turn off green led
SJMP internal_RAM_Test
$EJECT
;***************************************************************************
;*
;* PROCEDURE: Power_Up_Error
;*
;* PURPOSE: Halt system after error detected from tests
;*
;* CALLED FROM: None
;*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -