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

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

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

revision 1396 by dbug, Sat Jan 9 17:01:48 2016 UTC revision 1397 by dbug, Sun Apr 9 10:42:35 2017 UTC
# Line 5  Line 5 
5  #include "floppy_description.h"  #include "floppy_description.h"
6    
7  #ifdef ASSEMBLER    // 6502 Assembler API  #ifdef ASSEMBLER    // 6502 Assembler API
8  #define SetFileAddress(fileIndex,address)      ldx #fileIndex:lda #<address:ldy #>address:jsr $fff4  #define LoadFileAt(fileIndex,address)          lda #fileIndex:sta _LoaderApiEntryIndex:lda #<address:sta _LoaderApiAddressLow:lda #>address:sta _LoaderApiAddressHigh:jsr _LoadApiLoadFileFromDirectory
9  #define LoadFile(fileIndex)                    ldx #fileIndex:jsr $fff7  #define InitializeFileAt(fileIndex,address)    lda #fileIndex:sta _LoaderApiEntryIndex:lda #<address:sta _LoaderApiAddressLow:lda #>address:sta _LoaderApiAddressHigh:jsr _LoadApiInitializeFileFromDirectory
 #define LoadFileAt(fileIndex,address)          ldx #fileIndex:lda #<address:ldy #>address:jsr $fff4:jsr $fff7  
10    
11  #else               // C Compiler API  #else               // C Compiler API
12  extern unsigned char LoaderApiEntryIndex;  extern unsigned char LoaderApiEntryIndex;
# Line 15  extern unsigned char LoaderApiAddressLow Line 14  extern unsigned char LoaderApiAddressLow
14  extern unsigned char LoaderApiAddressHigh;  extern unsigned char LoaderApiAddressHigh;
15  extern void* LoaderApiAddress;  extern void* LoaderApiAddress;
16    
17  extern void SetLoadAddress();  #define LoadFileAt(fileIndex,address)          LoaderApiEntryIndex=fileIndex;LoaderApiAddress=(void*)address;LoadApiLoadFileFromDirectory();
18  extern void LoadFile();  #define InitializeFileAt(fileIndex,address)    LoaderApiEntryIndex=fileIndex;LoaderApiAddress=(void*)address;LoadApiInitializeFileFromDirectory();
19    
 #define SetFileAddress(fileIndex,address)      LoaderApiEntryIndex=fileIndex;LoaderApiAddress=address;LoaderApiSetLoadAddress();  
 #define LoadFile(fileIndex)                    LoaderApiEntryIndex=fileIndex;LoaderApiLoadFile();  
 #define LoadFileAt(fileIndex,address)          LoaderApiEntryIndex=fileIndex;LoaderApiAddress=address;LoaderApiSetLoadAddress();LoaderApiLoadFile();  
20    
21  #endif  #endif

Legend:
Removed from v.1396  
changed lines
  Added in v.1397

  ViewVC Help
Powered by ViewVC 1.1.26