|
|
1.1 ! root 1: /* ! 2: * UAE - The Un*x Amiga Emulator ! 3: * ! 4: * Memory access functions ! 5: * ! 6: * Copyright 1997 Bernd Schmidt ! 7: */ ! 8: ! 9: extern uae_u32 do_get_mem_long(uae_u32 *a); ! 10: #pragma aux do_get_mem_long = \ ! 11: "mov edx,[eax]" \ ! 12: "bswap edx" \ ! 13: parm [eax] \ ! 14: value [edx]; ! 15: ! 16: extern uae_u32 do_get_mem_word(uae_u16 *a); ! 17: #pragma aux do_get_mem_word = \ ! 18: "xor edx,edx" \ ! 19: "mov dx,[eax]" \ ! 20: "rol dx,8" \ ! 21: parm [eax] \ ! 22: value [edx]; ! 23: ! 24: static __inline__ uae_u32 do_get_mem_byte(uae_u8 *a) ! 25: { ! 26: return *a; ! 27: } ! 28: ! 29: extern void do_put_mem_long(uae_u32 *a, uae_u32 v); ! 30: #pragma aux do_put_mem_long = \ ! 31: "bswap edx" \ ! 32: "mov [eax],edx" \ ! 33: parm [eax] [edx] \ ! 34: modify [edx]; ! 35: ! 36: extern void do_put_mem_word(uae_u16 *a, uae_u16 v); ! 37: #pragma aux do_put_mem_word = \ ! 38: "rol dx,8" \ ! 39: "mov [eax],dx" \ ! 40: parm [eax] [dx] \ ! 41: modify [edx]; ! 42: ! 43: static __inline__ void do_put_mem_byte(uae_u8 *a, uae_u8 v) ! 44: { ! 45: *a = v; ! 46: } ! 47: ! 48: #define call_mem_get_func(func,addr) ((*func)(addr)) ! 49: #define call_mem_put_func(func,addr,v) ((*func)(addr,v)) ! 50: ! 51: #undef NO_INLINE_MEMORY_ACCESS ! 52: #undef MD_HAVE_MEM_1_FUNCS
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.