⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gxmlate.asm

📁 X86 GX1 BOOTLOAD代码 ,支持WINCE操作系统!
💻 ASM
字号:
;**************************************************************************
;* 
;*  GXMLATE.ASM
;* 
;*  Copyright (c) 2000 National Semiconductor Corporation.
;*  All Rights Reserved.
;* 
;*  Function: 
;*    Initialize CPU registers after mem init 
;* 
;*  $Revision:: 2   $
;*
;**************************************************************************

	;.MODEL TINY
	.486P

	INCLUDE DEF.INC
	INCLUDE MACROS.INC
	INCLUDE PORT80.INC
	INCLUDE OPTIONS.INC
	INCLUDE MPC.INC

_TEXT SEGMENT PUBLIC use16 'CODE'

	EXTERN	CpuRegWrite:NEAR
	EXTERN	CpuRegRead:NEAR
	EXTERN  csGeodeGetMmrBase:NEAR
	EXTERN  GetCPUSpeed:NEAR


;**************************************************************************
;*
;*	cpuLateInit
;*
;*	Initialize cpu registers after memory init. 
;*
;*	Entry:
;*	
;*	Exit:
;*	
;**************************************************************************
cpuLateInit PROC NEAR PUBLIC
	pushad

	mov	al, CPU_DIR1
	NOSTACK	bx, CpuRegRead
	cmp	al, 063h	; 5.3 and below Dont do anything
	jbe	doneWithCpuReg

	;MAPEN MUST ALREADY BE ENABLED
	mov	al, CPU_CCR4
	NOSTACK bx, CpuRegRead
	mov	dl, al
	or	dl, 020h	; FPU 2x Bit
	mov	al, CPU_CCR4
	NOSTACK bx, CpuRegWrite

	mov	al, 0F0h ; Incrementor Register.
 	NOSTACK bx, CpuRegRead
	mov	dl, al
	or	dl, 02h	; Turn on the Incrementor
	mov	al, 0F0h
	NOSTACK bx, CpuRegWrite

	call GetCPUSpeed
	push ax			;save cpuspeed

	mov	al, CPU_PCR
	NOSTACK bx, CpuRegRead
	mov	dl, al
	mov	dl, al
IF (SCx1xx_PROCESSOR eq 0)
; not on tavor sc1100	
	or	dl, 020h	;BUG #293
endif
	pop ax
	cmp ax, 300
	jl 	basesetting
	or	dl, 01h		;Incrementor setting 300+ = 05h   -300 = 04h
 basesetting:	
	or	dl, 04h	
	mov	al, CPU_PCR
	NOSTACK bx, CpuRegWrite

doneWithCpuReg:
	popad
	ret	
cpuLateInit ENDP


_TEXT ENDS

END

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -