jmechner
100755 191 lines (149 sloc) 2.285 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
 lst off

org = $1000
 org org

*-------------------------------------------------
*
* 08/01/85
* 07/02/87 mod for 3.5
*
* Demo using the 18 sector routines.
*
* Loads in a double hires picture
* from tracks 2,3,4 and 5.
*
* by Roland Gustafsson
*

temp0 = $3A
temp1 = $3B

RW18temp = $2100
RW18 = $D000

slot = $FD
track = $FE

*-------------------------------------------------
*
* Move to actual run address
*

start ldy #0
:0 lda $2000,y
 sta org,y
 iny
 bne :0
 jmp :1

* Tell RW18 which slot to use

:1 lda $43
 sta slot

 jsr check64k

* Turn on the disk drive (It is
* already on, but this call is
* necessary to initialize the
* RW18 routine)

LOOP jsr RW18
 hex 000100

* Clear hires page

 jsr hgr

* Now seek to track two since that
* is where the data starts.

 jsr RW18
 hex 020002

* Display double hires page one

 sta $C050
 sta $C052
 sta $C054
 sta $C057
 sta $C00D
 sta $C05E
 sta $C001

* Load in the picture

 bit $C055
 jsr LOADBANK
 bit $C054
 jsr LOADBANK
 sta $C000

* Turn off the drive

 jsr RW18
 hex 01

* Wait for keypress

waitkey lda $C000
 bpl waitkey
 sta $C010
 bmi LOOP

*-------------------------------------------------
*
* Load in two tracks
*
* The C in C3 and C4 means
* bit7:sound speaker on error
* bit6:auto inc track
*
* Read sequence
*

LOADBANK jsr RW18
 hex C320

* Read group

 jsr RW18
 hex 84
 hex 32333435363738393A
 hex 3B3C3D3E0000000000
* ^^^^^^^^
* Note that the last five sectors
* are ignored.
*
* Read last page by itself to
* test RW18.35.

 jsr RW18
 hex C4
 hex 000000000000000000
 hex 000000003F00000000

 rts

*-------------------------------------------------
*
* Clear double hires page
*

hgr sta $C005
 jsr :0
 sta $C004

:0 ldy #0
 ldx #$20
 sty temp0
 stx temp1
 tya
:1 sta (temp0),y
 iny
 bne :1
 inc temp1
 dex
 bne :1
 rts

*-------------------------------------------------
*
* Check for 64k and move RW18 to its home.
*

check64k bit $C08B
 bit $C08B
 ldy #0
:0 sty $E000
 cpy $E000
 bne NOT64K
 iny
 bne :0

* Move RW18 to $D000

 ldx #5
:1 lda RW18temp,y
:2 sta RW18,y
 iny
 bne :1
 inc :1+2
 inc :2+2
 dex
 bne :1
 rts

NOT64K sta $C081
 ldy #0
:0 lda :errtext,y
 beq *
 sta $628,y
 iny
 bne :0

:errtext ASC "REQUIRES 64K MEMORY",00

*------------------------------------------------- EOF

 sav demoboot

Markdown Cheat Sheet

Format Text

Headers

# This is an <h1> tag
## This is an <h2> tag
###### This is an <h6> tag

Text styles

*This text will be italic*
_This will also be italic_
**This text will be bold**
__This will also be bold__

*You **can** combine them*

Lists

Unordered

* Item 1
* Item 2
  * Item 2a
  * Item 2b

Ordered

1. Item 1
2. Item 2
3. Item 3
   * Item 3a
   * Item 3b

Miscellaneous

Images

![GitHub Logo](/images/logo.png)
Format: ![Alt Text](url)

Links

http://github.com - automatic!
[GitHub](http://github.com)

Blockquotes

As Kanye West said:

> We're living the future so
> the present is our past.

Code Examples in Markdown

Syntax highlighting with GFM

```javascript
function fancyAlert(arg) {
  if(arg) {
    $.facebox({div:'#foo'})
  }
}
```

Or, indent your code 4 spaces

Here is a Python code example
without syntax highlighting:

    def foo:
      if not bar:
        return true

Inline code for comments

I think you should use an
`<addr>` element here instead.

Something went wrong with that request. Please try again. Dismiss

Looking for the GitHub logo?