annotate level1/cmds/megaread.asm @ 2798:b70d93f8d7ce lwtools-port

Updated coco1/modules/makefile and coco3/modules/makefile to help resolve issues with i(x) and s(x) descriptors. Updated level1/coco1/modules/makefile & level2/coco3/modules/makefile so that correct values would be sent to assembler when building superdesc.asm for s(x).dd and i(x).dd descriptors.
author drencor-xeen
date Mon, 28 Jan 2013 16:13:05 -0600
parents 0b7321633fe9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2196
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
1 ***********************************************************************
1542
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
2 * MegaRead - Disk Performance Utility
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
3 * $Id$
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
4 *
1544
e548e2df2006 Megaread fixed by Rodney
boisy
parents: 1543
diff changeset
5 * Modified from an original program by Caveh Jalali
1542
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
6 * Edt/Rev YYYY/MM/DD Modified by
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
7 * Comment
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
8 * ------------------------------------------------------------------
1544
e548e2df2006 Megaread fixed by Rodney
boisy
parents: 1543
diff changeset
9 * 01/01 1987/05/30 Bruce Isted (CIS PPN 76625,2273)
e548e2df2006 Megaread fixed by Rodney
boisy
parents: 1543
diff changeset
10 * Released to the public domain
1542
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
11 *
1544
e548e2df2006 Megaread fixed by Rodney
boisy
parents: 1543
diff changeset
12 * 01/00 2004/04/22 Boisy G. Pitre
e548e2df2006 Megaread fixed by Rodney
boisy
parents: 1543
diff changeset
13 * Ported to NitrOS-9 style, no error on exit
e548e2df2006 Megaread fixed by Rodney
boisy
parents: 1543
diff changeset
14 *
e548e2df2006 Megaread fixed by Rodney
boisy
parents: 1543
diff changeset
15 * 01/01 2004/04/22 Rodney V. Hamilton
e548e2df2006 Megaread fixed by Rodney
boisy
parents: 1543
diff changeset
16 * Added EOF check for floppy
2196
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
17 *
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
18 * 01/02 2009/03/14 Bob Devries
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
19 * Added functionality to read a number of 1K blocks as specified on the command line.
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
20 * Command line is now: megaread #####
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
21 * where ##### is the number of 1K blocks to read; default 1024
2540
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
22 *
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
23 * 01/02 2010/05/22 Boisy G. Pitre
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
24 * Made source more configurable in terms of read chunk size and total read count
1528
1c5a50add566 Megaread added
boisy
parents:
diff changeset
25
1542
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
26 nam MegaRead
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
27 ttl Disk Performance Utilty
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
28
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
29 IFP1
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
30 use defsfile
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
31 ENDC
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
32
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
33 tylg set Prgrm+Objct
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
34 atrv set ReEnt+rev
2196
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
35 rev set $02
1542
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
36 edition set 1
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
37
2540
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
38 ChunkSz equ 1024
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
39 ChnkCnt equ 1024^2/ChunkSz 1024^2 is 1 megabyte (modify as desired)
1542
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
40
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
41 mod eom,name,tylg,atrv,start,size
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
42
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
43 org 0
2540
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
44 StartTm rmb 5
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
45 EndTm rmb 5
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
46 KiloBuff rmb ChunkSz
1542
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
47 rmb 200 stack space
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
48 size equ .
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
49
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
50 name fcs /MegaRead/
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
51 fcb edition
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
52
2196
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
53 start clra
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
54 clrb
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
55 bsr dec2bin read a character from command line and convert to binary
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
56 bsr dec2bin
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
57 bsr dec2bin
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
58 bsr dec2bin
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
59 bsr dec2bin
2540
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
60 * capture start time
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
61 leax StartTm,u
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
62 os9 F$Time
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
63 ldx #ChnkCnt seed X with count value to read target size
2196
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
64 cmpd #0 is command line number given?
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
65 beq loop no, so use default (in X)
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
66 tfr d,x yes, use it
1542
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
67 loop pshs x save counter
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
68 leax KiloBuff,u point (X) to buffer
2540
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
69 ldy #ChunkSz read predetermined chunk
1542
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
70 clra std input
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
71 os9 I$Read
1544
e548e2df2006 Megaread fixed by Rodney
boisy
parents: 1543
diff changeset
72 bcs eofchk
1542
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
73 puls x recover counter
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
74 leax -1,x done yet?
2540
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
75 bne loop no, go get another chunk
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
76 bra fini yes, exit
1554
d73d05da6483 Rodney fixed slight bug
boisy
parents: 1544
diff changeset
77 eofchk cmpb #E$EOF end of media?
1544
e548e2df2006 Megaread fixed by Rodney
boisy
parents: 1543
diff changeset
78 bne exit no, a real error
2540
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
79
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
80 * capture end time
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
81 fini
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
82 leax EndTm,u
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
83 os9 F$Time
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
84
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
85 * calculate difference and report
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
86
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
87 clrb
2196
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
88 exit os9 F$Exit
2540
0b7321633fe9 Updated megaread
boisy
parents: 2196
diff changeset
89
2196
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
90 dec2bin pshs b,a
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
91 ldb ,x get char from command line at X
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
92 subb #$30 convert decimal char to binary
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
93 bcs exd2b exit if < 0
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
94 cmpb #$09
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
95 bhi exd2b or > 9
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
96 leax 1,x bump cmd line pointer
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
97 pshs b save cmd line character
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
98 ldb #$0a
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
99 mul multiply by 10
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
100 stb 1,s
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
101 lda 2,s
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
102 ldb #$0a
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
103 mul
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
104 addb ,s+
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
105 adca ,s
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
106 std ,s
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
107 exd2b puls pc,b,a
1544
e548e2df2006 Megaread fixed by Rodney
boisy
parents: 1543
diff changeset
108
1542
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
109 emod
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
110 eom equ *
16d293af795b Obtained megaread source from RTSI
boisy
parents: 1528
diff changeset
111 end
2196
d5b309f1983f Updates by Bob
boisy
parents: 1554
diff changeset
112