Mercurial > hg > Members > kono > os9 > sbc09
comparison src/os9/level1/pdisk.asm @ 57:2088fd998865
sbc09 directry clean up
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 23 Jul 2018 16:07:12 +0900 |
parents | os9/level1/pdisk.asm@7c5379eb406e |
children |
comparison
equal
deleted
inserted
replaced
56:4fa2bdb0c457 | 57:2088fd998865 |
---|---|
1 ********************************************* | |
2 * Rdisk | |
3 * A driver for a Ram disk! | |
4 * Modified for os9l1 emulator by Soren Roug 2001 | |
5 * | |
6 | |
7 nam Pdisk | |
8 ttl A Device Driver for a RAM Disk | |
9 | |
10 ifp1 | |
11 use defsfile | |
12 endc | |
13 | |
14 *********************** | |
15 * Edition History | |
16 | |
17 * # date Comments | |
18 * -- -------- ---------------------------------------------- | |
19 | |
20 Revision equ 1 | |
21 NumDrvs set 2 Number of drives | |
22 | |
23 org Drvbeg | |
24 rmb NumDrvs*DrvMem | |
25 RAMSTA equ . | |
26 | |
27 mod RAMEND,RAMNAM,Drivr+Objct,Reent+Revision,RAMENT,RAMSTA | |
28 fcb $FF mode byte | |
29 | |
30 RAMNAM fcs /Pdisk/ | |
31 | |
32 RAMENT lbra INIT | |
33 lbra READ | |
34 lbra WRITE | |
35 lbra GETSTA | |
36 lbra PUTSTA | |
37 lbra TERM | |
38 | |
39 ***************************** | |
40 * INIT | |
41 * Set up the v09 disk | |
42 | |
43 INIT ldb #NumDrvs Set no drives to 2 | |
44 * Setup drive tables | |
45 stb V.NDRV,u save it | |
46 lda #$FF | |
47 leax DRVBEG,u point to drive table start | |
48 L0111 sta DD.TOT+1,x | |
49 sta <V.TRAK,x | |
50 leax <DRVMEM,x | |
51 decb | |
52 bne L0111 | |
53 clrb | |
54 INITXIT rts | |
55 | |
56 SETUPDT lda <PD.DRV,y Get the drive number | |
57 ldu V.PORT,u | |
58 sta 1,u drive number | |
59 stb 2,u msb of lsn | |
60 tfr x,d | |
61 sta 3,u | |
62 stb 4,u | |
63 ldd PD.BUF,y | |
64 sta 5,u buffer address | |
65 stb 6,u | |
66 rts | |
67 | |
68 ***************************** | |
69 * READ | |
70 * read a sector from disk | |
71 * Entry: U = Static Storage | |
72 * Y = Path Descriptor | |
73 * B = MSB of LSN | |
74 * X = LSB's of LSN | |
75 * Exit: 256 byte sector in PD.BUF buffer | |
76 * | |
77 READ bsr SETUPDT | |
78 lda #$81 | |
79 sta ,u // perform io | |
80 ldb ,u // return status | |
81 rts | |
82 | |
83 ***************************** | |
84 * WRITE | |
85 * Write a sector to disk | |
86 * Entry: U = Static Storage | |
87 * Y = Path Descriptor | |
88 * B = MSB of LSN | |
89 * X = LSB's of LSN | |
90 * PD.Buf = Sector to write | |
91 * | |
92 WRITE bsr SETUPDT | |
93 lda #$55 | |
94 sta ,u // perform io | |
95 ldb ,u // return status | |
96 WRIT99 rts | |
97 | |
98 ************************** | |
99 * GETSTA | |
100 * get device status | |
101 * | |
102 GETSTA | |
103 Unknown comb | |
104 clrb | |
105 rts | |
106 | |
107 ************************** | |
108 * PUTSTA | |
109 * Set device Status | |
110 * | |
111 PUTSTA | |
112 PUTSTA90 clrb | |
113 rts | |
114 | |
115 ***************************** | |
116 * TERM | |
117 * terminate Driver | |
118 * | |
119 TERM clrb | |
120 rts | |
121 | |
122 emod | |
123 RAMEND equ * | |
124 |