-
Notifications
You must be signed in to change notification settings - Fork 2
/
mypdos-com.src
95 lines (84 loc) · 2.02 KB
/
mypdos-com.src
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
; MyPicoDos 4.06 - standalone .COM version
;
; Copyright (C) 2006-2017 Matthias Reichl <[email protected]>
;
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
ORG = $3000
SRCADR = $E0
DSTADR = $E2
MYSTART = $1000
* = $02E0
.WORD ORG
* = ORG
; check SHIFT key, if pressed just exit
; LDA $D20F
; AND #8
; BNE DOCOPY
; RTS
; copy MyPicoDos code
DOCOPY LDA #<MYPDOS
STA SRCADR
LDA #>MYPDOS
STA SRCADR+1
LDA #<MYSTART
STA DSTADR
LDA #>MYSTART
STA DSTADR+1
LDX #MYPDPG
LDY #0
MYLP LDA (SRCADR),Y
STA (DSTADR),Y
INY
BNE MYLP
INC SRCADR+1
INC DSTADR+1
DEX
BNE MYLP
JMP MYSTART
MYPDOS = *
.IF .DEF BAREBONE
.incbin mypdos-code-b.bin
.ELSE
.IF HIDEF=0
.if .def THECART
.incbin mypdos-code-t-hioff.bin
.else
.if .def FREEZER
.incbin mypdos-code-f-hioff.bin
.else
.IF .DEF REMOTE
.incbin mypdos-code-r-hioff.bin
.ELSE
.incbin mypdos-code-hioff.bin
.ENDIF
.endif
.endif
.ELSE
.if .def THECART
.incbin mypdos-code-t.bin
.else
.if .def FREEZER
.incbin mypdos-code-f.bin
.else
.IF .DEF REMOTE
.incbin mypdos-code-r.bin
.ELSE
.incbin mypdos-code.bin
.ENDIF
.endif
.endif
.ENDIF
.ENDIF
MYPDPG = (*-MYPDOS+255) / 256