|
GBDK 2020 Docs
4.0.6
API Documentation for GBDK 2020
|
Go to the documentation of this file.
13 #ifndef __FAR_PTR_H_INCLUDE
14 #define __FAR_PTR_H_INCLUDE
25 #define TO_FAR_PTR(ofs, seg) (((FAR_PTR)seg << 16) | (FAR_PTR)ofs)
32 #define FAR_SEG(ptr) (((union __far_ptr *)&ptr)->segofs.seg)
39 #define FAR_OFS(ptr) (((union __far_ptr *)&ptr)->segofs.ofs)
41 #define FAR_FUNC(ptr, typ) ((typ)(((union __far_ptr *)&ptr)->segfn.fn))
65 #define FAR_CALL(ptr, typ, ...) (__call_banked_ptr=ptr,((typ)(&__call__banked))(__VA_ARGS__))
uint32_t to_far_ptr(void *ofs, uint16_t seg) OLDCALL
unsigned char uint8_t
Definition: stdint.h:51
volatile FAR_PTR __call_banked_ptr
unsigned long int uint32_t
Definition: stdint.h:53
void * ofs
Definition: far_ptr.h:76
struct __far_ptr::@1 segfn
volatile void * __call_banked_addr
unsigned short int uint16_t
Definition: stdint.h:52
#define OLDCALL
Definition: types.h:19
void(* fn)()
Definition: far_ptr.h:80
uint16_t seg
Definition: far_ptr.h:77
volatile uint8_t __call_banked_bank
FAR_PTR ptr
Definition: far_ptr.h:74
struct __far_ptr::@0 segofs
uint32_t FAR_PTR
Definition: far_ptr.h:69