1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-26 16:28:06 +11:00
collapseos/apps/sdct/glue.asm
Virgil Dupras 145b48efb7 Add apps/sdct
A new app to stress test the SD card driver. Also, accompanying this
commit, changes solidifying the SD card driver so that stress tests
actually pass :)
2019-06-10 15:54:15 -04:00

28 lines
664 B
NASM

; sdct
;
; We want to test reading and writing random data in random sequences of
; sectors. Collapse OS doesn't have a random number generator, so we'll simply
; rely on initial SRAM value, which tend is random enough for our purpose.
;
; How it works is simple. From its designated RAMSTART, it calls PutC until it
; reaches the end of RAM (0xffff). Then, it starts over and this time it reads
; every byte and compares.
;
; If there's an error, prints out where.
;
; *** Requirements ***
; sdcPutC
; sdcGetC
; printstr
; printHexPair
;
; *** Includes ***
#include "user.h"
.org USER_CODE
.equ SDCT_RAMSTART USER_RAMSTART
jp sdctMain
#include "sdct/main.asm"