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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1346 - (show annotations)
Sat Jan 9 16:14:40 2016 UTC (3 years, 8 months ago) by dbug
File MIME type: text/plain
File size: 1104 byte(s)
Updated Oric Tech to use the new FloppyBuilder API, and fixed some bugs.
1 //
2 // FloppyBuilder/Loader system
3 // Compatible with both C and Assembler modules
4 //
5 #include "floppy_description.h"
6
7 #ifdef ASSEMBLER // 6502 Assembler API
8 #define SetFileAddress(fileIndex,address) ldx #fileIndex:lda #<address:ldy #>address:jsr $fff4
9 #define LoadFile(fileIndex) ldx #fileIndex:jsr $fff7
10 #define LoadFileAt(fileIndex,address) ldx #fileIndex:lda #<address:ldy #>address:jsr $fff4:jsr $fff7
11
12 #else // C Compiler API
13 extern unsigned char LoaderApiEntryIndex;
14 extern unsigned char LoaderApiAddressLow;
15 extern unsigned char LoaderApiAddressHigh;
16 extern char* LoaderApiAddress;
17
18 extern void SetLoadAddress();
19 extern void LoadFile();
20
21 #define SetFileAddress(fileIndex,address) LoaderApiEntryIndex=fileIndex;LoaderApiAddress=address;LoaderApiSetLoadAddress();
22 #define LoadFile(fileIndex) LoaderApiEntryIndex=fileIndex;LoaderApiLoadFile();
23 #define LoadFileAt(fileIndex,address) LoaderApiEntryIndex=fileIndex;LoaderApiAddress=address;LoaderApiSetLoadAddress();LoaderApiLoadFile();
24
25 #endif

  ViewVC Help
Powered by ViewVC 1.1.26