/[projet1]/public/pc/tools/osdk/main/Osdk/_final_/sample/floppybuilder/code/loader_api.s
Defence Force logotype

Contents of /public/pc/tools/osdk/main/Osdk/_final_/sample/floppybuilder/code/loader_api.s

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1343 - (show annotations)
Thu Jan 7 18:57:50 2016 UTC (3 years, 10 months ago) by dbug
File size: 967 byte(s)
Simplified version of the FloppyBuilder sample code with a new api.
1 ;
2 ; Small code to implement the loading of data while a program is running.
3 ; What it does is to call the loader module, it abstracts the actual loader implementation
4 ;
5
6 .zero
7
8
9
10 .text
11
12 _LoaderApiEntryIndex .byt 0
13
14 _LoaderApiAddress
15 _LoaderApiAddressLow .byt 0
16 _LoaderApiAddressHigh .byt 0
17
18
19 _LoaderApiLoadFile
20 ; Draw the 'Loading Data message'
21 ;ldx #126
22 ;stx $bb80+40*26+39
23 ;inx
24 ;stx $bb80+40*27+39
25 ldx _LoaderApiEntryIndex
26 _LoaderApiLoadFileRegister
27 jsr $fff7 ; _LoadFile
28
29 ; Erase the 'Loading Data message'
30 ;ldx #16
31 ;stx $bb80+40*26+39
32 ;stx $bb80+40*27+39
33 rts
34
35 _LoaderApiSetLoadAddress
36 lda _LoaderApiAddressLow
37 ldy _LoaderApiAddressHigh
38 ldx _LoaderApiEntryIndex
39 _LoaderApiSetLoadAddressRegister
40 jmp $fff4 ; SetLoadAddress
41
42
43 ; x: file index
44 ; a: Low part of address
45 ; y: High part of address
46 _LoaderApiLoadFileAtAddressRegister
47 jsr $fff4 ; SetLoadAddress
48 jmp $fff7 ; _LoadFile

  ViewVC Help
Powered by ViewVC 1.1.26