blob: 5419aefe46a64dec084a238abc5e180e002f3987 (
plain)
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
|
; Initial load segment for the fnchat.exe executable. Sets MEMTOP and
; RAMTOP to $C000, disables BASIC (on XL/XE), disables ANTIC DMA (not
; really), then returns so the rest of the .xex continues to load.
*= $2000
memsetup
; close the E: device
lda #$0c ; CIO CLOSE command
sta $0342 ; ICCOM
ldx #0 ; channel 0
jsr $E456 ; CIOV
; disable BASIC (XL/XE only)
lda $d301 ; PORTB
ora #$02
sta $d301
; set up everything else
lda #$C0
sta $6a ; RAMTOP
sta $02e6 ; MEMTOP high
lda #0
sta $02e5 ; MEMTOP low
;sta $022f ; SDMCTL (turn off screen)
; give the SDMCTL change time to get applied by the OS
lda $14 ; RTCLOK+2
loop
cmp $14 ; wait until next frame
beq loop
rts
*= $02e2 ; INITAD
.word memsetup
|