/[projet1]/public/oric/demos/OricTech/code/loader_api.s
Defence Force logotype

Diff of /public/oric/demos/OricTech/code/loader_api.s

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1345 by dbug, Sun May 31 12:03:16 2015 UTC revision 1346 by dbug, Sat Jan 9 16:14:40 2016 UTC
# Line 2  Line 2 
2  ; Small code to implement the loading of data while a program is running.  ; 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  ; What it does is to call the loader module, it abstracts the actual loader implementation
4  ;  ;
   
         .zero  
   
   
   
5          .text          .text
6    
7  _LoaderApiEntryIndex    .byt 0  _LoaderApiEntryIndex    .byt 0
# Line 15  _LoaderApiAddress Line 10  _LoaderApiAddress
10  _LoaderApiAddressLow    .byt 0  _LoaderApiAddressLow    .byt 0
11  _LoaderApiAddressHigh   .byt 0  _LoaderApiAddressHigh   .byt 0
12    
13    _LoaderApiLoadFile
 _LoadFile  
         ; Draw the 'Loading Data message'  
         ;ldx #126  
         ;stx $bb80+40*26+39  
         ;inx  
         ;stx $bb80+40*27+39  
14          ldx _LoaderApiEntryIndex          ldx _LoaderApiEntryIndex
15  _LoadFileRegister        _LoaderApiLoadFileRegister      
16          jsr $fff7                                       ; _LoadFile          jmp $fff7                                       ; _LoadFile
   
         ; Erase the 'Loading Data message'  
         ;ldx #16  
         ;stx $bb80+40*26+39  
         ;stx $bb80+40*27+39  
         rts  
17    
18  _SetLoadAddress  _LoaderApiSetLoadAddress
19          lda _LoaderApiAddressLow          lda _LoaderApiAddressLow
20          ldy _LoaderApiAddressHigh          ldy _LoaderApiAddressHigh
21          ldx _LoaderApiEntryIndex          ldx _LoaderApiEntryIndex
22  _SetLoadAddressRegister  _LoaderApiSetLoadAddressRegister        
23          jmp $fff4                                       ; SetLoadAddress          jmp $fff4                                       ; SetLoadAddress
24    
25    
26  ; x: file index  ; x: file index
27  ; a: Low part of address  ; a: Low part of address
28  ; y: High part of address  ; y: High part of address
29  _LoadFileAtAddressRegister  _LoaderApiLoadFileAtAddressRegister
30          jsr $fff4                                       ; SetLoadAddress          jsr $fff4                                       ; SetLoadAddress
31          jmp $fff7                                       ; _LoadFile          jmp $fff7                                       ; _LoadFile

Legend:
Removed from v.1345  
changed lines
  Added in v.1346

  ViewVC Help
Powered by ViewVC 1.1.26