| Line | |
|---|
| 1 | /* $Id: kKLasmutils.h,v 1.3 2001-10-16 02:21:05 bird Exp $
|
|---|
| 2 | *
|
|---|
| 3 | * Assembly utilities.
|
|---|
| 4 | *
|
|---|
| 5 | * Copyright (c) 1998-2001 knut st. osmundsen (kosmunds@csc.com)
|
|---|
| 6 | *
|
|---|
| 7 | * Project Odin Software License can be found in LICENSE.TXT
|
|---|
| 8 | *
|
|---|
| 9 | */
|
|---|
| 10 | #ifndef _asmutils_h_
|
|---|
| 11 | #define _asmutils_h_
|
|---|
| 12 |
|
|---|
| 13 | #ifdef __cplusplus
|
|---|
| 14 | extern "C" {
|
|---|
| 15 | #endif
|
|---|
| 16 |
|
|---|
| 17 | extern unsigned short _System GetCS(void);
|
|---|
| 18 | extern unsigned short _System GetDS(void);
|
|---|
| 19 | extern unsigned short _System GetES(void);
|
|---|
| 20 | extern unsigned short _System GetFS(void);
|
|---|
| 21 | extern unsigned short _System GetGS(void);
|
|---|
| 22 | extern unsigned short _System GetSS(void);
|
|---|
| 23 |
|
|---|
| 24 | extern void _System DisableInterrupts(void);
|
|---|
| 25 | extern void _System EnableInterrupts(void);
|
|---|
| 26 |
|
|---|
| 27 | extern unsigned long _Optlink AtomicInc(unsigned long *pul);
|
|---|
| 28 | extern unsigned long _Optlink AtomicIncWrap(unsigned long *pul, unsigned long ulMax);
|
|---|
| 29 | extern unsigned long _Optlink AtomicDec(unsigned long *pul);
|
|---|
| 30 | extern unsigned long _Optlink AtomicSet(unsigned long *pul, unsigned long ul);
|
|---|
| 31 | extern unsigned long _Optlink AtomicSetEqual(unsigned long *pul, unsigned long ulSet, unsigned long ulCurrent);
|
|---|
| 32 |
|
|---|
| 33 | #if 0
|
|---|
| 34 | //extern void _System Int3(void);
|
|---|
| 35 | extern int _System Int3(void);
|
|---|
| 36 | #else
|
|---|
| 37 | #include <builtin.h>
|
|---|
| 38 | #define Int3() __interrupt(3)
|
|---|
| 39 | #endif
|
|---|
| 40 |
|
|---|
| 41 | //Negative offsets don't work yet?
|
|---|
| 42 | extern void __stdcall memmov(void *p, signed int off, unsigned int len);
|
|---|
| 43 |
|
|---|
| 44 | #ifdef __cplusplus
|
|---|
| 45 | }
|
|---|
| 46 | #endif
|
|---|
| 47 | #endif
|
|---|
| 48 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.