Mercurial > hg > Members > kono > nitros9-code
changeset 2196:d5b309f1983f
Updates by Bob
author | boisy |
---|---|
date | Sat, 14 Mar 2009 12:15:35 +0000 |
parents | 8b38d4f75b44 |
children | f7e2fbabc999 |
files | level1/cmds/megaread.asm level1/sys/megaread.hp |
diffstat | 2 files changed, 40 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/level1/cmds/megaread.asm Wed Mar 11 11:15:49 2009 +0000 +++ b/level1/cmds/megaread.asm Sat Mar 14 12:15:35 2009 +0000 @@ -1,10 +1,8 @@ -******************************************************************** +*********************************************************************** * MegaRead - Disk Performance Utility -* * $Id$ * * Modified from an original program by Caveh Jalali -* * Edt/Rev YYYY/MM/DD Modified by * Comment * ------------------------------------------------------------------ @@ -16,6 +14,11 @@ * * 01/01 2004/04/22 Rodney V. Hamilton * Added EOF check for floppy +* +* 01/02 2009/03/14 Bob Devries +* Added functionality to read a number of 1K blocks as specified on the command line. +* Command line is now: megaread ##### +* where ##### is the number of 1K blocks to read; default 1024 nam MegaRead ttl Disk Performance Utilty @@ -26,7 +29,7 @@ tylg set Prgrm+Objct atrv set ReEnt+rev -rev set $01 +rev set $02 edition set 1 ReadK equ 1024 1024K is 1 megabyte (modify as desired) @@ -41,7 +44,17 @@ name fcs /MegaRead/ fcb edition -start ldx #ReadK +start clra + clrb + bsr dec2bin read a character from command line and convert to binary + bsr dec2bin + bsr dec2bin + bsr dec2bin + bsr dec2bin + ldx #ReadK seed X with value for 1 meg read + cmpd #0 is command line number given? + beq loop no, so use default (in X) + tfr d,x yes, use it loop pshs x save counter leax KiloBuff,u point (X) to buffer ldy #$0400 read 1K @@ -55,8 +68,27 @@ eofchk cmpb #E$EOF end of media? bne exit no, a real error exitok clrb -exit os9 F$Exit +exit os9 F$Exit +dec2bin pshs b,a + ldb ,x get char from command line at X + subb #$30 convert decimal char to binary + bcs exd2b exit if < 0 + cmpb #$09 + bhi exd2b or > 9 + leax 1,x bump cmd line pointer + pshs b save cmd line character + ldb #$0a + mul multiply by 10 + stb 1,s + lda 2,s + ldb #$0a + mul + addb ,s+ + adca ,s + std ,s +exd2b puls pc,b,a emod eom equ * end +