dragonball 的内存检测程序
来源:互联网 发布:下载手机截图软件 编辑:程序博客网 时间:2024/06/05 14:56
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; File Name: MEMTEST.S
; Descriptions: Writing 0x01..0xFF to memory and then verify
; it.
; Programed by: Teddy Wong
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
XREF STKTOP
XREF DATA
#define BOOTSTRAP
; Define Pointer to Store the Start Address and End Address
pSTART equ $1500
pEND equ $1504
SECTION code
START
movea.l #STKTOP,a7 ;re-istall stack pointer in case bootstrap mode
****************************************************************************
move.l pSTART,a0 ; a0 as the address to write
move.l #1,d1 ; d1 contains the number 0x01-0xFF
clr.b d5 ; clear d5 as a counter for ECHO
WRITE
cmp.b #0,d5
bne NO_W
bsr WRITING
NO_W addi.b #1,d5
move.b d1,(a0)+ ; write d1 to (a0)
add.b #1,d1
cmp.b #0,d1 ; set d1 to 1 if d1==0
bne NEXTWR ; to prevent writing 0 to DRAM
move.b #1,d1 ;
NEXTWR cmp.l pEND,a0 ; check the size copy
blt WRITE
; END of WRITE
****************************************************************************
move.l pSTART,a0 ; a0 as the address to write
clr.l d0
move.l #1,d1 ; d1 contains the number 0x01-0xFF
clr.b d5 ; clear d5 as a counter for ECHO
CHECK
cmp.b #0,d5
bne NO_C
bsr CHECKING
NO_C addi.b #1,d5
move.b (a0)+,d0
cmp.b d0,d1 ; check for error
bne ERR
add.b #1,d1
cmp.b #0,d1 ; set d1 to 1 if d1==0
bne NEXTCHK ;
move.b #1,d1 ;
NEXTCHK cmp.l pEND,a0
blt CHECK
; END of CHECK
****************************************************************************
bra FINISH
ERR
#ifdef BOOTSTRAP
bsr wait
move.b #'e',$FFFFF907 ; display error
bsr wait
move.b #'r',$fffff907
bsr wait
move.b #'r',$fffff907
bsr wait
move.b #'o',$fffff907
bsr wait
move.b #'r',$fffff907
bsr wait
move.b #0,$fffff907
#endif
bra EXIT
FINISH
#ifdef BOOTSTRAP
bsr wait
move.b #'P',$fffff907 ; display PASS
bsr wait
move.b #'A',$fffff907
bsr wait
move.b #'S',$fffff907
bsr wait
move.b #'S',$fffff907
bsr wait
move.b #0,$fffff907
#endif
bra EXIT
wait btst.b #7,$fffff906
beq.b wait
move.w #$fff,d1
lp_wt sub.w #1,d1
bne.b lp_wt
rts
WRITING nop
#ifdef BOOTSTRAP
move.b #'W',$fffff907
nop
move.b #0,$fffff907
nop
#endif
rts
CHECKING
#ifdef BOOTSTRAP
nop
move.b #'C',$fffff907
nop
move.b #0,$fffff907
nop
#endif
rts
EXIT ; return to bootstrap mode
#ifdef BOOTSTRAP
;jmp START ; Loop Test
;jmp $ffffff44 ; EZ
jmp $FFFFFF5A ; VZ
#endif
END
- dragonball 的内存检测程序
- 检测delphi的程序的内存泄漏
- 检测delphi的程序的内存泄漏
- 内存泄漏检测程序的算法优化
- instuments检测命令行程序的内存泄漏
- C++程序检测内存泄露
- 检测ios程序内存问题
- Android程序内存占用检测
- dmalloc检测程序内存泄漏
- JNI程序如何检测C代码的内存泄漏
- 如何检测非MFC程序的内存泄露?
- 手工添加MFC程序的内存泄漏检测代码
- 安装efence库检测程序的内存错误
- 使用valgrind检测Android native程序的内存
- 调试 方便地检测程序的内存泄漏 CMemoryState
- 使用valgrind检测Android native程序的内存
- OpenCV程序内存泄露的预防与检测
- VC 检测程序内存泄露的CMemoryState类
- Ajax无限联动菜单
- 我心中的敏捷(3)----两种世界观
- 我心中的敏捷(4)----多样的形式与不变的本质
- Ubuntu 8.1 安装后相关设置
- 对团队知识管理的一些思考
- dragonball 的内存检测程序
- 关于BASIC
- 解读FriendFeed对MySQL的使用
- C,C#与C++
- 在Solaris操作系统上开发C 应用程序
- 病毒是如何编写的
- VB与C
- “火狐”很“51”
- C语言的应用范围, 发展前途