166 lines
7.5 KiB
Plaintext
166 lines
7.5 KiB
Plaintext
/*
|
|
In this file, symbols defined OSMain assembly
|
|
files are given C+ definitions. This file
|
|
is included when you compile the kernel, after
|
|
the assembly files have been assembled, making
|
|
the C+ definitions available for the C+ OSMain
|
|
files. It is also included as part of booting.
|
|
|
|
The assembly global labels are stored as HTT_SYS_SYMBOL
|
|
entries in the hash table. These symols are placed
|
|
into the OSMain binary module and added to the
|
|
symbol hash table at boot before this file
|
|
gets #included during boot.
|
|
|
|
See
|
|
$LK,"ADAMK2","FF:::/LT/OSMain/OS.ASZ,ADAMK2"$ for where it is included during compiling the kernel.
|
|
$LK,"ADAMK2","FF:::/LT/OSMain/ADAM.CPZ,ADAMK2"$ for whee it is included during boots.
|
|
$LK,"AddOsMapSymbols","FF:::/LT/OSMain/END.CPZ,AddOsMapSymbols"$ for where the OSMain symbols are added to the hash tables.
|
|
|
|
*/
|
|
|
|
LTextern FREE_GDT_LIST U1 *free_gdt_list;
|
|
LTextern GDTTAB U4 gdttab;
|
|
public LTextern SYS_EXTERN_TABLE U4 *ext;
|
|
public LTextern SYS_FLAGS U4 sys_flags;
|
|
public LTextern SYS_BOOT_BASE U4 sys_boot_base;
|
|
public LTextern SYS_HEAP_BASE U4 sys_heap_base;
|
|
public LTextern SYS_HEAP_LIMIT U4 sys_heap_limit;
|
|
LTextern SYS_BOOT_CODE U4 sys_boot_code;
|
|
public LTextern SYS_BOOT_HEADER_BASE U4 sys_boot_header_base;
|
|
public LTextern SYS_IRQ_FLAGS U4 sys_irq_flags;
|
|
public LTextern SYS_IRQ_BUSY_FLAGS U4 sys_irq_busy_flags;
|
|
LTextern MEM_FREE_LIST MemBlk *mem_free_list;
|
|
LTextern FREE_PAGE_HASH MemBlk *free_page_hash[FREE_PAGE_HASH_SIZE];
|
|
LTextern FREE_PAGE_HASH2 MemBlk *free_page_hash2[32];
|
|
LTextern SYS_CUR_FOCUS_TASK TssStruct *sys_cur_focus_task;
|
|
LTextern SYS_SWAPS_CNTER U4 sys_swap_cnter;
|
|
LTextern SYS_CUR_RAW_SCAN_CODE U4 sys_cur_raw_scan_code;
|
|
LTextern SYS_CUR_SCAN_CODE U4 sys_cur_scan_code;
|
|
public LTextern PROGRESS1 U8 progress1;
|
|
public LTextern PROGRESS2 U8 progress2;
|
|
public LTextern PROGRESS3 U8 progress3;
|
|
public LTextern PROGRESS4 U8 progress4;
|
|
public LTextern FC_1 double one;
|
|
public LTextern FC_PI double pi;
|
|
public LTextern FC_PI2 double pi2;
|
|
public LTextern FC_E double e; //not implemented
|
|
public LTextern FC_LOG2_10 double log2_10;
|
|
public LTextern FC_LOG2_E double log2_E;
|
|
public LTextern FC_LOG10_2 double log10_2;
|
|
public LTextern FC_LOGE_2 double logE_2;
|
|
LTextern SYS_TEXTBASE U4 *textbase;
|
|
LTextern SYS_GRBASE GrBitMap *grbase;
|
|
LTextern SYS_GRBASE2 GrBitMap *grbase2;
|
|
LTextern SYS_GRMODE I4 grmode;
|
|
LTextern SYS_GRWIDTH I4 grwidth;
|
|
LTextern SYS_GRHEIGHT I4 grheight;
|
|
public LTextern GET_MACHINE_REGS void GetMachineRegs(
|
|
MachineRegsStruct *m);
|
|
public LTextern ALPHA_BITMAP U1 alpha_bitmap[1];
|
|
public LTextern ALPHA_NUMERIC_BITMAP U1 alpha_numeric_bitmap[1];
|
|
public LTextern DEC_NUMERIC_BITMAP U1 dec_numeric_bitmap[1];
|
|
public LTextern HEX_NUMERIC_BITMAP U1 hex_numeric_bitmap[1];
|
|
public LTextern PRINTABLE_CHARS_BITMAP U1 printable_chars_bitmap[1];
|
|
public LTextern SAFE_DOLLAR_CHARS_BITMAP U1 safe_dollar_chars_bitmap[1];
|
|
public LTextern FILENAME_CHARS_BITMAP U1 filename_chars_bitmap[1];
|
|
public LTextern DISPLAYABLE_CHARS_BITMAP U1 displayable_chars_bitmap[1];
|
|
public LTintern EC_FS TssStruct *Fs();
|
|
public LTintern EC_CLI void Cli();
|
|
public LTintern EC_STI void Sti();
|
|
public LTintern EC_GET_FLAGS U8 GetFlags();
|
|
public LTintern EC_SET_FLAGS void SetFlags(U8 d);
|
|
public LTintern EC_GET_STACK_PTR U8 GetStackPtr();
|
|
public LTintern EC_SET_STACK_PTR void SetStackPtr(U8 d);
|
|
public LTintern EC_GET_BASE_PTR U8 GetBasePtr();
|
|
public LTintern EC_SET_BASE_PTR void SetBasePtr(U8 d);
|
|
public LTintern EC_BT BoolU4 Bt(U1 *bit_field,U8 bit);
|
|
public LTintern EC_BTS BoolU4 Bts(U1 *bit_field,U8 bit);
|
|
public LTintern EC_BTR BoolU4 Btr(U1 *bit_field,U8 bit);
|
|
public LTintern EC_BTC BoolU4 Btc(U1 *bit_field,U8 bit);
|
|
public LTintern EC_BSF I8 Bsf(U4 bit_field);
|
|
public LTintern EC_BSR I8 Bsr(U4 bit_field);
|
|
public LTintern EC_INSQUE void InsQue(U1 *entry,U1 *pred);
|
|
public LTintern EC_INSQUE_REV void InsQueRev(U1 *entry,U1 *succ);
|
|
public LTintern EC_REMQUE void RemQue(U1 *entry);
|
|
public LTintern EC_INP U1 InP(U8 port);
|
|
public LTintern EC_OUTP void OutP(U8 port, U8 val);
|
|
public LTintern EC_MEMCPY void MemCpy(U1 *dst,U1 *src,U8 cnt);
|
|
public LTintern EC_MEMSET void MemSet(U1 *dst,U8 val,U8 cnt);
|
|
public LTintern EC_INPW U8 InPW(U8 port);
|
|
public LTintern EC_OUTPW void OutPW(U8 port, U8 val);
|
|
public LTintern EC_INPD U8 InPD(U8 port);
|
|
public LTintern EC_OUTPD void OutPD(U8 port, U8 val);
|
|
public LTintern EC_STRLEN U8 StrLen(I1 *st);
|
|
|
|
public LTextern CP_REP_INSB void RepInSB(U1 *buf,U8 cnt,U8 port);
|
|
public LTextern CP_REP_INSW void RepInSW(U1 *buf,U8 cnt,U8 port);
|
|
public LTextern CP_REP_OUTSB void RepOutSB(U1 *buf,U8 cnt,U8 port);
|
|
public LTextern CP_REP_OUTSW void RepOutSW(U1 *buf,U8 cnt,U8 port);
|
|
|
|
public LTextern CP_FSQRT double Sqrt(double d);
|
|
public LTextern CP_FSIN double Sin(double d);
|
|
public LTextern CP_FCOS double Cos(double d);
|
|
public LTextern CP_FTAN double Tan(double d);
|
|
public LTextern CP_ARG double Arg(double x,double y);
|
|
public LTextern CP_FATAN double ATan(double d);
|
|
public LTextern CP_FRNDINT double Round(double d);
|
|
public LTextern CP_FLOOR double Floor(double d);
|
|
public LTextern CP_POW10 double Pow10(double d);
|
|
public LTextern CP_LOG2 double Log2(double d);
|
|
public LTextern CP_LOG10 double Log10(double d);
|
|
public LTextern CP_LN double Ln(double d);
|
|
public LTextern CP_EXP double Exp(double d);
|
|
public LTextern CP_FLDCW void Fldcw(U2 w);
|
|
public LTextern CP_FCLEX void Fclex();
|
|
public LTextern CP_FSTCW U2 Fstcw();
|
|
public LTextern CP_FSTSW U2 Fstsw();
|
|
|
|
public LTextern OR_U2_BIT_FIELD void OrWordBitField(
|
|
U1 *bit_field,U8 bit,U2 pattern);
|
|
public LTextern EXTRACT_U2_BIT_FIELD void ExtractWordBitField(
|
|
U1 *bit_field,U8 bit,U8 size);
|
|
public LTextern DEBUG_SPIN_WAIT void DebugSpinWait();
|
|
LTextern FREE_MEM_BLK_LIST void FreeMemBlkList();
|
|
public LTextern CP_MALLOC U1 *MAlloc(U8 size,TssStruct *tss=NULL);
|
|
public LTextern CP_FREE void Free(U1 *add,TssStruct *tss=NULL);
|
|
public LTextern CP_MSIZE U8 MSize(U1 *src); //size of heap object
|
|
public LTextern CP_HASH_STRING U8 HashString(I1 *st);
|
|
public LTextern CP_STRCMP I8 StrCmp(I1 *st1,I1 *st2);
|
|
public LTextern CP_STRNCMP I8 StrNCmp(I1 *st1,I1 *st2,U4 n);
|
|
public LTextern CP_STRSTR I1 *StrStr(I1 *st,I1 *pattern);
|
|
public LTextern CP_STRISTR I1 *StrIStr(I1 *st,I1 *pattern);
|
|
public LTextern CP_STRCPY void StrCpy(I1 *dest,I1 *src);
|
|
public LTextern CP_STRCAT void StrCat(I1 *dest,I1 *src);
|
|
public LTextern CP_GET_CHAR I8 SysGetChar(); //use this withing OSmain, but not exe{}
|
|
|
|
LTextern MONTH_START_DAYS1 U2 month_start_days1[12];
|
|
LTextern MONTH_START_DAYS2 U2 month_start_days2[12];
|
|
public LTextern CP_FAULT void Fault(U8 num);
|
|
public LTextern SWAP_IN_NEXT void SwapInNext();
|
|
public LTextern CP_FIND_HASH_ENTRY SysHashEntry *
|
|
FindHashEntry(I1 *st,SysHashTable *table,U8 mask);
|
|
public LTextern CP_FIND_HASH_BUCKET SysHashEntry **
|
|
FindHashBucket(I1 *st,SysHashTable *table);
|
|
|
|
public LTextern CP_FIND_EXTERN U1 *FindExtern(I1 *st);
|
|
|
|
LTextern TRANSLATE_SCAN_CODE I1 TranslateScanCode(U8 sc); //no Echo
|
|
LTextern CP_GET_KEY U8 GetKey();
|
|
public LTextern CP_REBOOT void Reboot();
|
|
public LTextern CRLF void CrLf();
|
|
public LTextern CP_DEACTIVATE_USER TssStruct *DeactivateUser();
|
|
public LTextern CP_ACTIVATE_NEXT_USER void ActivateNextUser();
|
|
|
|
public LTextern U64_MUL U8 MulU8(U8 p1,U8 p2);
|
|
public LTextern I64_MUL I8 MulI8(I8 p1,I8 p2);
|
|
|
|
public LTextern CP_RUN_STATEMENT U8 Run(U1 *s);
|
|
LTextern CP_FLUSH_MSGS U8 IntFlushMsgs();
|
|
LTextern CP_ARC_DETERMINE_COMPRESSION_TYPE
|
|
I8 ArcDetermineCompressionType(U1 *src,U8 size);
|
|
public LTextern CP_ARC_CHECK_SUM U8 ArcCheckSum(U1 *buf,U8 size);
|
|
LTextern CP_ARC_GET_TABLE_ENTRY
|
|
void ArcGetTableEntry(ArcCs *c);
|
|
|
|
|