mirror of https://github.com/wwarthen/RomWBW.git
688 changed files with 76635 additions and 0 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,20 @@ |
|||||
|
/****************************/ |
||||
|
/* applvers.h dwg - 2.0.0.0 */ |
||||
|
/****************************/ |
||||
|
|
||||
|
#define A_RMJ 2 |
||||
|
#define A_RMN 0 |
||||
|
#define A_RUP 0 |
||||
|
#define A_RTP 0 |
||||
|
|
||||
|
#define A_MONTH 6 |
||||
|
#define A_DAY 10 |
||||
|
#define A_YEAR 2012 |
||||
|
#define A_YR 12 |
||||
|
|
||||
|
/********************/ |
||||
|
/* eof - applvers.h */ |
||||
|
/********************/ |
||||
|
|
||||
|
|
||||
|
|
||||
@ -0,0 +1,67 @@ |
|||||
|
; asmiface.asm 6/4/2012 dwg - |
||||
|
|
||||
|
extrn .begin,.chl,.swt |
||||
|
extrn csave,cret,.move |
||||
|
|
||||
|
global xrega_,1 |
||||
|
global xregbc_,2 |
||||
|
global xregde_,2 |
||||
|
global xreghl_,2 |
||||
|
|
||||
|
PUBLIC asmif_ |
||||
|
asmif_: lxi d,.2 |
||||
|
call csave |
||||
|
|
||||
|
LXI H,8-.2 ; pick up 1st parm "function address" |
||||
|
DAD SP |
||||
|
MOV E,M |
||||
|
INX H |
||||
|
MOV D,M |
||||
|
xchg |
||||
|
shld callad+1 |
||||
|
|
||||
|
LXI H,10-.2 |
||||
|
DAD SP |
||||
|
MOV E,M |
||||
|
INX H |
||||
|
MOV D,M ; DE = parm |
||||
|
xchg |
||||
|
shld xregbc_ |
||||
|
|
||||
|
LXI H,12-.2 |
||||
|
DAD SP |
||||
|
MOV E,M |
||||
|
INX H |
||||
|
MOV D,M |
||||
|
xchg |
||||
|
shld xregde_ |
||||
|
|
||||
|
LXI H,14-.2 |
||||
|
DAD SP |
||||
|
MOV E,M |
||||
|
INX H |
||||
|
MOV D,M |
||||
|
xchg |
||||
|
shld xreghl_ |
||||
|
|
||||
|
lhld xregbc_ |
||||
|
mov b,h |
||||
|
mov c,l ; setup B&C |
||||
|
lhld xregde_ |
||||
|
xchg ; setup D&E |
||||
|
lhld xreghl_ ; setup H&L |
||||
|
|
||||
|
callad: call 0e639h ; setlu |
||||
|
|
||||
|
sta xrega_ |
||||
|
shld xreghl_ |
||||
|
xchg |
||||
|
shld xregde_ |
||||
|
mov l,c |
||||
|
mov h,b |
||||
|
shld xregbc_ |
||||
|
RET ; HL has return value |
||||
|
|
||||
|
.2 EQU 0 |
||||
|
END |
||||
|
|
||||
@ -0,0 +1,14 @@ |
|||||
|
/*****************************/ |
||||
|
/* asmiface.H 6/4/2012 dwg - */ |
||||
|
/*****************************/ |
||||
|
|
||||
|
extern char xrega; |
||||
|
extern unsigned int xregbc; |
||||
|
extern unsigned int xregde; |
||||
|
extern unsigned int xreghl; |
||||
|
extern asmif(); /* asmif(0xe60,bc,de,hl); */ |
||||
|
|
||||
|
/********************/ |
||||
|
/* eof - asmiface.h */ |
||||
|
/********************/ |
||||
|
|
||||
@ -0,0 +1,4 @@ |
|||||
|
/* banner.h */ |
||||
|
extern sbanner(); |
||||
|
extern banner(); |
||||
|
|
||||
@ -0,0 +1,71 @@ |
|||||
|
; bdoscall.asm 3/10/2012 dwg - bdos binding for Aztec C |
||||
|
|
||||
|
global drega_,1 |
||||
|
global dregbc_,2 |
||||
|
global dregde_,2 |
||||
|
global dreghl_,2 |
||||
|
|
||||
|
PUBLIC lurst_ |
||||
|
lurst_: |
||||
|
|
||||
|
push b |
||||
|
push d |
||||
|
push h |
||||
|
push psw |
||||
|
|
||||
|
mvi c,37 |
||||
|
lxi d,127 |
||||
|
lxi b,127 |
||||
|
call 5 |
||||
|
|
||||
|
pop psw |
||||
|
pop h |
||||
|
pop d |
||||
|
pop b |
||||
|
|
||||
|
RET |
||||
|
|
||||
|
|
||||
|
PUBLIC bdoscall_ |
||||
|
bdoscall_: |
||||
|
|
||||
|
push b |
||||
|
push d |
||||
|
push h |
||||
|
push psw |
||||
|
|
||||
|
lhld dregbc_ |
||||
|
mov b,h |
||||
|
mov c,l |
||||
|
|
||||
|
lhld dregde_ |
||||
|
mov d,h |
||||
|
mov e,l |
||||
|
|
||||
|
lhld dreghl_ |
||||
|
|
||||
|
lda drega_ |
||||
|
|
||||
|
call 5 |
||||
|
|
||||
|
sta drega_ |
||||
|
|
||||
|
shld dreghl_ |
||||
|
|
||||
|
mov l,e |
||||
|
mov h,d |
||||
|
shld dregde_ |
||||
|
|
||||
|
mov l,c |
||||
|
mov h,b |
||||
|
shld dregbc_ |
||||
|
|
||||
|
pop psw |
||||
|
pop h |
||||
|
pop d |
||||
|
pop b |
||||
|
|
||||
|
RET |
||||
|
|
||||
|
END |
||||
|
|
||||
@ -0,0 +1,8 @@ |
|||||
|
/* bdoscall.h 3/10/2012 dwg - header file for bdoscall */ |
||||
|
|
||||
|
extern char drega; |
||||
|
extern unsigned int dregbc; |
||||
|
extern unsigned int dregde; |
||||
|
extern unsigned int dreghl; |
||||
|
extern bdoscall(); |
||||
|
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,80 @@ |
|||||
|
; bioscall.asm 3/10/2012 dwg - bios binding for Aztec C |
||||
|
|
||||
|
global irega_,1 |
||||
|
global iregbc_,2 |
||||
|
global iregde_,2 |
||||
|
global ireghl_,2 |
||||
|
|
||||
|
|
||||
|
public getmeta_ |
||||
|
getmeta_: |
||||
|
push psw |
||||
|
push b |
||||
|
push d |
||||
|
push h |
||||
|
|
||||
|
lxi b,4 |
||||
|
lxi d,0 |
||||
|
call 0e61bh |
||||
|
|
||||
|
lxi d,0 |
||||
|
call 0e61eh |
||||
|
|
||||
|
lxi d,11 |
||||
|
call 0e621h |
||||
|
|
||||
|
lxi d,80h |
||||
|
call 0e624h |
||||
|
|
||||
|
call 0e627h |
||||
|
|
||||
|
pop h |
||||
|
pop d |
||||
|
pop b |
||||
|
pop psw |
||||
|
ret |
||||
|
|
||||
|
PUBLIC bioscall_ |
||||
|
bioscall_: |
||||
|
|
||||
|
push b |
||||
|
push d |
||||
|
push h |
||||
|
push psw |
||||
|
|
||||
|
lhld iregbc_ |
||||
|
mov b,h |
||||
|
mov c,l |
||||
|
|
||||
|
lhld iregde_ |
||||
|
mov d,h |
||||
|
mov e,l |
||||
|
|
||||
|
lhld ireghl_ |
||||
|
shld mycall+1 |
||||
|
|
||||
|
lda irega_ |
||||
|
|
||||
|
mycall: call 5 |
||||
|
|
||||
|
sta irega_ |
||||
|
|
||||
|
shld ireghl_ |
||||
|
|
||||
|
mov l,e |
||||
|
mov h,d |
||||
|
shld iregde_ |
||||
|
|
||||
|
mov l,c |
||||
|
mov h,b |
||||
|
shld iregbc_ |
||||
|
|
||||
|
pop psw |
||||
|
pop h |
||||
|
pop d |
||||
|
pop b |
||||
|
|
||||
|
RET |
||||
|
|
||||
|
END |
||||
|
|
||||
@ -0,0 +1,8 @@ |
|||||
|
/* bioscall.h 3/10/2012 dwg - header file for bdoscall */ |
||||
|
|
||||
|
extern char irega; |
||||
|
extern unsigned int iregbc; |
||||
|
extern unsigned int iregde; |
||||
|
extern unsigned int ireghl; |
||||
|
extern bioscall(); |
||||
|
|
||||
Binary file not shown.
@ -0,0 +1,41 @@ |
|||||
|
/* cbanner.c 3/12/2012 dwg - */ |
||||
|
|
||||
|
#include "portab.h" |
||||
|
#include "globals.h" |
||||
|
#include "applvers.h" |
||||
|
|
||||
|
char * lines = "----------------------------------------"; |
||||
|
char * line1 = "12345678.123 mm/dd/yyyy Version x.x.x.x"; |
||||
|
char * line2 = "S/N CPM80-DWG-654321 Licensed under GPL3"; |
||||
|
char * line3 = "Copyright (C) 2011-12 Douglas W. Goodall"; |
||||
|
|
||||
|
sbanner(program) |
||||
|
char *program; |
||||
|
{ |
||||
|
char szTemp[128]; |
||||
|
|
||||
|
printf("%s ",program); |
||||
|
printf("%2d/%2d/%4d ",A_MONTH,A_DAY,A_YEAR); |
||||
|
printf("Version %d.%d.%d.%d ",A_RMJ,A_RMN,A_RUP,A_RTP); |
||||
|
printf("COPR Douglas Goodall Licensed w/GPLv3\n"); |
||||
|
} |
||||
|
|
||||
|
banner(program) |
||||
|
char *program; |
||||
|
{ |
||||
|
char szTemp[128]; |
||||
|
|
||||
|
printf("%s\n",lines); |
||||
|
strcpy(szTemp,program); |
||||
|
while(12 > strlen(szTemp)) { |
||||
|
strcat(szTemp," "); |
||||
|
} |
||||
|
printf("%s ",szTemp); |
||||
|
printf("%2d/%2d/%4d ",A_MONTH,A_DAY,A_YEAR); |
||||
|
printf("Version %d.%d.%d.%d\n",A_RMJ,A_RMN,A_RUP,A_RTP); |
||||
|
printf("%s\n",line2); |
||||
|
printf("%s\n",line3); |
||||
|
printf("%s\n",lines); |
||||
|
} |
||||
|
|
||||
|
|
||||
@ -0,0 +1 @@ |
|||||
|
裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹裹 |
||||
@ -0,0 +1,133 @@ |
|||||
|
/* chars.c 6/7/2012 dwg - test command line arguments */ |
||||
|
|
||||
|
#include "stdio.h" |
||||
|
|
||||
|
#include "portab.h" |
||||
|
#include "globals.h" |
||||
|
#include "std.h" |
||||
|
#include "cpm80.h" |
||||
|
#include "cpmappl.h" |
||||
|
#include "applvers.h" |
||||
|
|
||||
|
#define TOP 0 |
||||
|
#define LEFT 4 |
||||
|
|
||||
|
char map[256] = |
||||
|
{ |
||||
|
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ |
||||
|
|
||||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0 */ |
||||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 1 */ |
||||
|
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 2 */ |
||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 3 0 - 9 */ |
||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 4 A - O */ |
||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 5 P - Z */ |
||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 6 a - o */ |
||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, /* 7 p - z */ |
||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 8 */ |
||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 9 */ |
||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* A */ |
||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* B 0 - 9 */ |
||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* C A - O */ |
||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* D P - Z */ |
||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* E a - o */ |
||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* F p - z */ |
||||
|
}; |
||||
|
|
||||
|
char attroff[] = { 27, '[', 'm', 0 }; |
||||
|
char attrbold[] = { 27, '[', '1', 'm', 0 }; |
||||
|
char attrlow[] = { 27, '[', '2', 'm', 0 }; |
||||
|
char attrundr[] = { 27, '[', '4', 'm', 0 }; |
||||
|
char attrblnk[] = { 27, '[', '5', 'm', 0 }; |
||||
|
char attrrevs[] = { 27, '[', '7', 'm', 0 }; |
||||
|
char attrinvs[] = { 27, '[', '8', 'm', 0 }; |
||||
|
char graphon[] = { 27, 'F', 0 }; |
||||
|
char graphoff[] = { 27, 'G', 0 }; |
||||
|
|
||||
|
|
||||
|
char atreset[] = "0"; |
||||
|
char atbold[] = "1"; |
||||
|
char atdim[] = "2"; |
||||
|
char atundrscr[] = "4"; |
||||
|
char atblink[] = "5"; |
||||
|
char atrevs[] = "7"; |
||||
|
char athidden[] = "8"; |
||||
|
|
||||
|
char fgblack[] = "30"; |
||||
|
char fgred[] = "31"; |
||||
|
char fggreen[] = "32"; |
||||
|
char fgyellow[] = "33"; |
||||
|
char fgblue[] = "34"; |
||||
|
char fgmagenta[] = "35"; |
||||
|
char fgcyan[] = "36"; |
||||
|
char fgwhite[] = "37"; |
||||
|
|
||||
|
char bgblack[] = "40"; |
||||
|
char bgred[] = "41"; |
||||
|
char bggreen[] = "42"; |
||||
|
char bgyellow[] = "43"; |
||||
|
char bgblue[] = "44"; |
||||
|
char bgmagenta[] = "45"; |
||||
|
char bgcyan[] = "46"; |
||||
|
char bgwhite[] = "47"; |
||||
|
|
||||
|
dispattr(attr,fg,bg) |
||||
|
char * attr; |
||||
|
char * fg; |
||||
|
char * bg; |
||||
|
{ |
||||
|
printf("%c[%s;%s;%sm",27,attr,fg,bg); |
||||
|
} |
||||
|
|
||||
|
int main(argc,argv) |
||||
|
int argc; |
||||
|
char *argv[]; |
||||
|
{ |
||||
|
int i,j,k; |
||||
|
int x,y; |
||||
|
|
||||
|
if(1 < argc) { |
||||
|
for(i=1;i<argc;i++) { |
||||
|
printf("%c",atoi(argv[i])); |
||||
|
} |
||||
|
} else { |
||||
|
|
||||
|
crtinit(); |
||||
|
crtclr(); |
||||
|
crtlc(0,0); |
||||
|
|
||||
|
dispattr(atbold,fggreen,bgblack); |
||||
|
banner("CHARS"); |
||||
|
|
||||
|
printf("%s",attroff); |
||||
|
|
||||
|
dispattr(atbold,fgcyan,bgblack); |
||||
|
for(x=0;x<16;x++) { |
||||
|
crtlc(TOP+6,LEFT+(x*4)+5); |
||||
|
printf("[%x]",x); |
||||
|
} |
||||
|
printf("%s",attroff); |
||||
|
|
||||
|
for(y=0;y<16;y++) { |
||||
|
crtlc(TOP+y+7,LEFT+0); |
||||
|
dispattr(atbold,fgcyan,bgblack); |
||||
|
printf("[%x]",y); |
||||
|
printf("%s",attroff); |
||||
|
|
||||
|
for(x=0;x<16;x++) { |
||||
|
crtlc(TOP+y+7,LEFT+(x*4)+6); |
||||
|
if(1 == map[(y*16)+x]) { |
||||
|
printf("."); |
||||
|
} else { |
||||
|
printf("%c",(y*16)+x); |
||||
|
} |
||||
|
} |
||||
|
dispattr(atbold,fgcyan,bgblack); |
||||
|
printf(" [%x]",y); |
||||
|
printf("%s",attroff); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return 0; |
||||
|
} |
||||
|
|
||||
@ -0,0 +1,57 @@ |
|||||
|
/* clogical.c 6/4/2012 dwg - */ |
||||
|
|
||||
|
#include "portab.h" |
||||
|
#include "cpmbios.h" |
||||
|
#include "asmiface.h" |
||||
|
|
||||
|
lugcur(drive) |
||||
|
{ |
||||
|
asmif(pGETLU,drive,0,0); |
||||
|
return xregde; |
||||
|
} |
||||
|
|
||||
|
lugnum(drive) |
||||
|
{ |
||||
|
asmif(pGETLU,drive,0,0); |
||||
|
return xreghl; |
||||
|
} |
||||
|
|
||||
|
lugdu(drive) |
||||
|
{ |
||||
|
asmif(pGETLU,drive,0,0); |
||||
|
return xregbc>>8; |
||||
|
} |
||||
|
|
||||
|
luscur(drive,lunum) |
||||
|
{ |
||||
|
asmif(pGETLU,drive,0,0); |
||||
|
/* A = Result 0=OK */ |
||||
|
/* B = devunit */ |
||||
|
/* DE = current */ |
||||
|
/* HL = numlu */ |
||||
|
|
||||
|
/* BC = devunit*256+drive */ |
||||
|
/* DE = current */ |
||||
|
/* HL = numlu */ |
||||
|
asmif(pSETLU,xregbc,lunum,xreghl); |
||||
|
} |
||||
|
|
||||
|
lusnum(drive,numlu) |
||||
|
{ |
||||
|
asmif(pGETLU,drive,0,0); |
||||
|
/* A = Result 0=OK */ |
||||
|
/* B = devunit */ |
||||
|
/* DE = current */ |
||||
|
/* HL = numlu */ |
||||
|
|
||||
|
/* BC = devunit*256+drive */ |
||||
|
/* DE = current */ |
||||
|
/* HL = numlu */ |
||||
|
asmif(pSETLU,xregbc,xregde,numlu); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/********************/ |
||||
|
/* eof - clogical.c */ |
||||
|
/********************/ |
||||
|
|
||||
@ -0,0 +1,18 @@ |
|||||
|
|
||||
|
/*****************************/ |
||||
|
/* clogical.H 6/4/2012 dwg - */ |
||||
|
/*****************************/ |
||||
|
|
||||
|
#define METATRK 0 |
||||
|
#define METASEC 11 |
||||
|
|
||||
|
extern lugdu(); |
||||
|
extern lugcur(); |
||||
|
extern luscur(); |
||||
|
extern lugnum(); |
||||
|
extern lusnum(); |
||||
|
|
||||
|
/********************/ |
||||
|
/* eof - clogical.h */ |
||||
|
/********************/ |
||||
|
|
||||
@ -0,0 +1,53 @@ |
|||||
|
/* cmemory.c 3/13/2012 dwg - */ |
||||
|
|
||||
|
#include "portab.h" |
||||
|
/* #include "cpmbind.h" */ |
||||
|
|
||||
|
memcmp(xptr,yptr,count) |
||||
|
u8 * xptr; |
||||
|
u8 * yptr; |
||||
|
int count; |
||||
|
{ |
||||
|
u8 * x; |
||||
|
u8 * y; |
||||
|
int i; |
||||
|
|
||||
|
x = xptr; |
||||
|
y = yptr; |
||||
|
for(i=0;i<count;i++) { |
||||
|
if(*x++ != *y++) return FALSE; |
||||
|
} |
||||
|
return TRUE; |
||||
|
} |
||||
|
|
||||
|
memcpy(dstptr,srcptr,count) |
||||
|
u8 * dstptr; |
||||
|
u8 * srcptr; |
||||
|
int count; |
||||
|
{ |
||||
|
u8 * s; |
||||
|
u8 * d; |
||||
|
int i; |
||||
|
|
||||
|
s = srcptr; |
||||
|
d = dstptr; |
||||
|
for(i=0;i<count;i++) { |
||||
|
*d++ = *s++; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
memset(dstptr,data,count) |
||||
|
u8 * dstptr; |
||||
|
u8 data; |
||||
|
u16 count; |
||||
|
{ |
||||
|
u8 * p; |
||||
|
int i; |
||||
|
|
||||
|
p = dstptr; |
||||
|
for(i=0;i<count;i++) { |
||||
|
*p++ = data; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
@ -0,0 +1,108 @@ |
|||||
|
/* cnamept1.c 5/24/2012 dwg - added bootlu */ |
||||
|
|
||||
|
#include "stdio.h" |
||||
|
#include "stdlib.h" |
||||
|
|
||||
|
#include "portab.h" |
||||
|
#include "std.h" |
||||
|
|
||||
|
#include "cnfgdata.h" |
||||
|
#include "syscfg.h" |
||||
|
|
||||
|
extern pager(); |
||||
|
|
||||
|
char cache[17]; |
||||
|
|
||||
|
cnamept1(syscfg) |
||||
|
struct SYSCFG * syscfg; |
||||
|
{ |
||||
|
strcpy(cache,"syscfg->cnfgdata"); |
||||
|
|
||||
|
printf("syscfg->jmp jp 0%04xh",syscfg->jmp.address); |
||||
|
pager(); |
||||
|
|
||||
|
printf("syscfg->cnfloc .dw 0%04xh",syscfg->cnfloc); |
||||
|
pager(); |
||||
|
|
||||
|
printf("syscfg->tstloc .dw 0%04xh",syscfg->tstloc); |
||||
|
pager(); |
||||
|
|
||||
|
printf("syscfg->varloc .dw 0%04xh",syscfg->varloc); |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.rmj = %d",cache,syscfg->cnfgdata.rmj); |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.rmn = %d",cache,syscfg->cnfgdata.rmn); |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.rup = %d",cache,syscfg->cnfgdata.rup); |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.rtp = %d",cache,syscfg->cnfgdata.rtp); |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.diskboot = ",cache); |
||||
|
switch(syscfg->cnfgdata.diskboot) { |
||||
|
case TRUE: printf("TRUE"); break; |
||||
|
case FALSE: printf("FALSE"); break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.devunit = 0x%02x",cache, |
||||
|
syscfg->cnfgdata.devunit); |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.bootlu = 0x%04x",cache, |
||||
|
syscfg->cnfgdata.bootlu); |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.freq = %dMHz",cache,syscfg->cnfgdata.freq); |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.platform = ",cache); |
||||
|
switch(syscfg->cnfgdata.platform) { |
||||
|
case PLT_N8VEM: printf("N8VEM"); break; |
||||
|
case PLT_ZETA: printf("ZETA"); break; |
||||
|
case PLT_N8: printf("N8"); break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.dioplat = ",cache); |
||||
|
switch(syscfg->cnfgdata.dioplat) { |
||||
|
case DPNONE: printf("DIOPLT_NONE"); break; |
||||
|
case DPDIO: printf("DIOPLT_DISKIO"); break; |
||||
|
case DPZETA: printf("DIOPLT_ZETA"); break; |
||||
|
case DPDIDE: printf("DIOPLT_DIDE"); break; |
||||
|
case DPN8: printf("DIOPLT_N8"); break; |
||||
|
case DPDIO3: printf("DIOPLT_DISKIO3"); break; |
||||
|
default: printf("Unknown"); break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.vdumode = ",cache); |
||||
|
switch(syscfg->cnfgdata.vdumode) { |
||||
|
case VPNONE: printf("VDUPLT_NONE"); break; |
||||
|
case VPVDU: printf("VDUPLT_VDU"); break; |
||||
|
case VPVDUC: printf("VDUPLT_VDUC"); break; |
||||
|
case VPPROPIO: printf("VDUPLT_PROPIO"); break; |
||||
|
case VPN8: printf("VDUPLT_VPN8"); break; |
||||
|
default: printf("Unknown!!"); break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.romsize = %d",cache, |
||||
|
syscfg->cnfgdata.romsize); |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.ramsize = %d",cache, |
||||
|
syscfg->cnfgdata.ramsize); |
||||
|
pager(); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
/********************/ |
||||
|
/* eof - cnamecp1.c */ |
||||
|
/********************/ |
||||
|
|
||||
@ -0,0 +1,113 @@ |
|||||
|
/* cnamept2.c 5/24/2012 dwg - */ |
||||
|
|
||||
|
#include "stdio.h" |
||||
|
#include "stdlib.h" |
||||
|
|
||||
|
#include "portab.h" |
||||
|
#include "std.h" |
||||
|
|
||||
|
#include "cnfgdata.h" |
||||
|
#include "syscfg.h" |
||||
|
|
||||
|
extern pager(); |
||||
|
|
||||
|
char cache[17]; |
||||
|
|
||||
|
cnamept2(syscfg) |
||||
|
struct SYSCFG * syscfg; |
||||
|
{ |
||||
|
strcpy(cache,"syscfg->cnfgdata"); |
||||
|
|
||||
|
printf("%s.clrramdk = ",cache); |
||||
|
switch(syscfg->cnfgdata.clrramdk) { |
||||
|
case CLRNEV: printf("CLR_NEVER"); break; |
||||
|
case CLRAUTO: printf("CLR_AUTO"); break; |
||||
|
case CLRALLW: printf("CLR_ALLWAYS"); break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.dskyenable = ",cache); |
||||
|
switch(syscfg->cnfgdata.dskyenable) { |
||||
|
case TRUE: printf("TRUE"); break; |
||||
|
case FALSE: printf("FALSE"); break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.uartenable = ",cache); |
||||
|
switch(syscfg->cnfgdata.uartenable) { |
||||
|
case TRUE: printf("TRUE"); break; |
||||
|
case FALSE: printf("FALSE"); break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.vduenable = ",cache); |
||||
|
switch(syscfg->cnfgdata.vduenable) { |
||||
|
case TRUE: printf("TRUE"); break; |
||||
|
case FALSE: printf("FALSE"); break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.fdenable = ",cache); |
||||
|
switch(syscfg->cnfgdata.fdenable) { |
||||
|
case TRUE: printf("TRUE"); break; |
||||
|
case FALSE: printf("FALSE"); break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
if(TRUE == syscfg->cnfgdata.fdenable) { |
||||
|
|
||||
|
printf("%s.fdtrace = ",cache); |
||||
|
switch(syscfg->cnfgdata.fdtrace) { |
||||
|
case 0: printf("Silent"); break; |
||||
|
case 1: printf("Fatal Errors"); break; |
||||
|
case 2: printf("All Errors"); break; |
||||
|
case 3: printf("Everything"); break; |
||||
|
default: printf("Unknown!!"); break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.fdmedia = ",cache); |
||||
|
switch(syscfg->cnfgdata.fdmedia) { |
||||
|
case FDM720: printf("FDM720"); |
||||
|
printf(" 3.5 720KB 2-sided 80 Trks 9 Sectors"); |
||||
|
break; |
||||
|
case FDM144: printf("FDM144"); |
||||
|
printf(" 3.5 1.44MB 2-sided 80 Trks 18 Sectors"); |
||||
|
break; |
||||
|
case FDM360: printf("FDM360"); |
||||
|
printf(" 5.25 360KB 2-sided 40 Trks 9 Sectors"); |
||||
|
break; |
||||
|
case FDM120: printf("FDM120"); |
||||
|
printf(" 3.5 1.2MB 2-sided 80 Trks 15 Sectors"); |
||||
|
break; |
||||
|
default: printf("Unknown!!"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.fdmediaalt = ",cache); |
||||
|
switch(syscfg->cnfgdata.fdmediaalt) { |
||||
|
case FDM720: printf("FDM720"); |
||||
|
printf(" 3.5 720KB 2-sided 80 Trks 9 Sectors"); |
||||
|
break; |
||||
|
case FDM144: printf("FDM144"); |
||||
|
printf(" 3.5 1.44MB 2-sided 80 Trks 18 Sectors"); |
||||
|
break; |
||||
|
case FDM360: printf("FDM360"); |
||||
|
printf(" 5.25 360KB 2-sided 40 Trks 9 Sectors"); |
||||
|
break; |
||||
|
case FDM120: printf("FDM120"); |
||||
|
printf(" 3.5 1.2MB 2-sided 80 Trks 15 Sectors"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/********************/ |
||||
|
/* eof - cnamept2.c */ |
||||
|
/********************/ |
||||
|
|
||||
|
|
||||
@ -0,0 +1,216 @@ |
|||||
|
/* cnamept2.c 5/24/2012 dwg - */ |
||||
|
|
||||
|
#include "stdio.h" |
||||
|
#include "stdlib.h" |
||||
|
|
||||
|
#include "portab.h" |
||||
|
#include "std.h" |
||||
|
|
||||
|
#include "cnfgdata.h" |
||||
|
#include "syscfg.h" |
||||
|
|
||||
|
extern pager(); |
||||
|
|
||||
|
char cache[17]; |
||||
|
|
||||
|
cnamept3(syscfg) |
||||
|
struct SYSCFG * syscfg; |
||||
|
{ |
||||
|
strcpy(cache,"syscfg->cnfgdata"); |
||||
|
|
||||
|
printf("%s.fdmauto = ",cache); |
||||
|
switch(syscfg->cnfgdata.fdmauto) { |
||||
|
case TRUE: printf("TRUE"); |
||||
|
break; |
||||
|
case FALSE: printf("FALSE"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.ideenable = ",cache); |
||||
|
switch(syscfg->cnfgdata.ideenable) { |
||||
|
case TRUE: printf("TRUE"); |
||||
|
break; |
||||
|
case FALSE: printf("FALSE"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
if(TRUE == syscfg->cnfgdata.ideenable) { |
||||
|
|
||||
|
printf("%s.idetrace = ",cache); |
||||
|
switch(syscfg->cnfgdata.idetrace) { |
||||
|
case 0: printf("SILENT"); |
||||
|
break; |
||||
|
case 1: printf("ERRORS"); |
||||
|
break; |
||||
|
case 2: printf("EVERYTHING"); |
||||
|
break; |
||||
|
default: printf("Unknown!!"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.de8bit = ",cache); |
||||
|
switch(syscfg->cnfgdata.ide8bit) { |
||||
|
case TRUE: printf("TRUE"); |
||||
|
break; |
||||
|
case FALSE: printf("FALSE"); |
||||
|
break; |
||||
|
default: printf("Unknown!!"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.idecapacity = %dMB",cache, |
||||
|
syscfg->cnfgdata.idecapacity); |
||||
|
pager(); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
printf("%s.ppideenable = ",cache); |
||||
|
switch(syscfg->cnfgdata.ppideenable) { |
||||
|
case TRUE: printf("TRUE"); |
||||
|
break; |
||||
|
case FALSE: printf("FALSE"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
if(TRUE == syscfg->cnfgdata.ppideenable) { |
||||
|
|
||||
|
printf("%s.ppidetrace = ",cache); |
||||
|
switch(syscfg->cnfgdata.ppidetrace) { |
||||
|
case 0: printf("SILENT"); |
||||
|
break; |
||||
|
case 1: printf("ERRORS"); |
||||
|
break; |
||||
|
case 2: printf("EVERYTHING"); |
||||
|
break; |
||||
|
default: printf("Unknown!!"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
|
||||
|
printf("%s.ppide8bit = ",cache); |
||||
|
switch(syscfg->cnfgdata.ppide8bit) { |
||||
|
case TRUE: printf("TRUE"); |
||||
|
break; |
||||
|
case FALSE: printf("FALSE"); |
||||
|
break; |
||||
|
default: printf("Unknown!!"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.ppidecapacity = %dKB",cache, |
||||
|
syscfg->cnfgdata.ppidecapacity); |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.ppideslow = ",cache); |
||||
|
switch(syscfg->cnfgdata.ppideslow) { |
||||
|
case TRUE: printf("TRUE"); |
||||
|
break; |
||||
|
case FALSE: printf("FALSE"); |
||||
|
break; |
||||
|
default: printf("Unknown!!"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
printf("%s.boottype = ",cache); |
||||
|
switch(syscfg->cnfgdata.boottype) { |
||||
|
case BTMENU: printf("BT_MENU"); |
||||
|
break; |
||||
|
case BTAUTO: printf("BT_AUTO"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.boottimeout = %d seconds",cache, |
||||
|
syscfg->cnfgdata.boottimeout); |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.bootdefault = %c:",cache, |
||||
|
syscfg->cnfgdata.bootdefault); |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.baudrate = %u (0x%04x) Baud",cache, |
||||
|
syscfg->cnfgdata.baudrate,syscfg->cnfgdata.baudrate); |
||||
|
pager(); |
||||
|
|
||||
|
if(PLT_N8 == syscfg->cnfgdata.platform) { |
||||
|
|
||||
|
printf("%s.ckdiv = %d",cache, |
||||
|
syscfg->cnfgdata.ckdiv); |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.memwait = 0x%02x",cache, |
||||
|
syscfg->cnfgdata.memwait); |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.iowait = 0x%02x",cache,syscfg->cnfgdata.iowait); |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.cntlb0 = 0x%02x",cache,syscfg->cnfgdata.cntlb0); |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.cntlb1 = 0x%02x",cache,syscfg->cnfgdata.cntlb1); |
||||
|
pager(); |
||||
|
|
||||
|
|
||||
|
printf("%s.sdenable = ",cache); |
||||
|
switch(syscfg->cnfgdata.sdenable) { |
||||
|
case TRUE: printf("TRUE"); |
||||
|
break; |
||||
|
case FALSE: printf("FALSE"); |
||||
|
break; |
||||
|
default: printf("Unknown!!"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.sdtrace = ",cache); |
||||
|
switch(syscfg->cnfgdata.sdtrace) { |
||||
|
case TRUE: printf("TRUE"); |
||||
|
break; |
||||
|
case FALSE: printf("FALSE"); |
||||
|
break; |
||||
|
default: printf("Unknown!!"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/********************/ |
||||
|
/* eof - cnamept3.c */ |
||||
|
/********************/ |
||||
|
|
||||
|
/*
|
||||
|
unsigned char ckdiv; |
||||
|
unsigned char memwait; |
||||
|
|
||||
|
unsigned char iowait; |
||||
|
unsigned char cntlb0; |
||||
|
unsigned char cntlb1; |
||||
|
unsigned char sdenable; |
||||
|
unsigned char sdtrace; |
||||
|
unsigned int sdcapacity; |
||||
|
unsigned char sdcsio; |
||||
|
unsigned char sdcsiofast; |
||||
|
unsigned char defiobyte; |
||||
|
unsigned char termtype; |
||||
|
unsigned int revision; |
||||
|
unsigned char prpsdenable; |
||||
|
unsigned char prpsdtrace; |
||||
|
unsigned int prpsdcapacity; |
||||
|
unsigned char prpconenable; |
||||
|
unsigned int biossize; |
||||
|
*/ |
||||
|
|
||||
@ -0,0 +1,198 @@ |
|||||
|
/* cnamept2.c 5/24/2012 dwg - */ |
||||
|
|
||||
|
#include "stdio.h" |
||||
|
#include "stdlib.h" |
||||
|
|
||||
|
#include "portab.h" |
||||
|
#include "std.h" |
||||
|
|
||||
|
#include "cnfgdata.h" |
||||
|
#include "syscfg.h" |
||||
|
|
||||
|
extern pager(); |
||||
|
|
||||
|
char cache[17]; |
||||
|
|
||||
|
cnamept4(syscfg) |
||||
|
struct SYSCFG * syscfg; |
||||
|
{ |
||||
|
strcpy(cache,"syscfg->cnfgdata"); |
||||
|
|
||||
|
if(PLT_N8 == syscfg->cnfgdata.platform) { |
||||
|
|
||||
|
printf("%s.sdcapacity = %uKB",cache, |
||||
|
syscfg->cnfgdata.sdcapacity); |
||||
|
pager(); |
||||
|
|
||||
|
|
||||
|
printf("%s.sdcsio = ",cache); |
||||
|
switch(syscfg->cnfgdata.sdcsio) { |
||||
|
case TRUE: printf("TRUE"); |
||||
|
break; |
||||
|
case FALSE: printf("FALSE"); |
||||
|
break; |
||||
|
default: |
||||
|
printf("Unknown!!"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.sdcsiofast = ",cache); |
||||
|
switch(syscfg->cnfgdata.sdcsiofast) { |
||||
|
case TRUE: printf("TRUE"); |
||||
|
break; |
||||
|
case FALSE: printf("FALSE"); |
||||
|
break; |
||||
|
default: printf("Unknown!!"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
printf("%s.defiobyte = 0x%02x",cache, |
||||
|
syscfg->cnfgdata.defiobyte); |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.termtype = ",cache); |
||||
|
switch(syscfg->cnfgdata.termtype) { |
||||
|
case TERM_TTY: printf("TERM_TTY"); |
||||
|
break; |
||||
|
case TERM_ANSI: printf("TERM_ANSI"); |
||||
|
break; |
||||
|
case TERM_WYSE: printf("TERM_WYSE"); |
||||
|
break; |
||||
|
case TERM_VT52: printf("TERM_VT52"); |
||||
|
break; |
||||
|
default: printf("Unknown!!"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.revision = %d",cache, |
||||
|
syscfg->cnfgdata.revision); |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.prpenable = ",cache); |
||||
|
switch(syscfg->cnfgdata.prpenable) { |
||||
|
case TRUE: printf("TRUE"); |
||||
|
break; |
||||
|
case FALSE: printf("FALSE"); |
||||
|
break; |
||||
|
default: printf("Unknown!!"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
if(TRUE == syscfg->cnfgdata.prpenable) { |
||||
|
|
||||
|
printf("%s.prpsdenable = "); |
||||
|
switch(syscfg->cnfgdata.prpsdenable) { |
||||
|
case TRUE: printf("TRUE"); |
||||
|
break; |
||||
|
case FALSE: printf("FALSE"); |
||||
|
break; |
||||
|
default: printf("Unknown!!"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
if(TRUE == syscfg->cnfgdata.prpsdenable) { |
||||
|
|
||||
|
printf("%s.prpsdtrace = ",cache); |
||||
|
switch(syscfg->cnfgdata.prpsdtrace) { |
||||
|
case 0: printf("SILENT"); |
||||
|
break; |
||||
|
case 1: printf("ERRORS"); |
||||
|
break; |
||||
|
case 2: printf("EVERYTHING"); |
||||
|
break; |
||||
|
default: printf("Unknown!!"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.prpsdcapacity = ",cache); |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.prpconenable = ",cache); |
||||
|
switch(syscfg->cnfgdata.prpconenable) { |
||||
|
case TRUE: printf("TRUE"); |
||||
|
break; |
||||
|
case FALSE: printf("FALSE"); |
||||
|
break; |
||||
|
default: printf("Unknown!!"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
printf("%s.biossize = %d",cache, |
||||
|
syscfg->cnfgdata.biossize); |
||||
|
pager(); |
||||
|
|
||||
|
|
||||
|
printf("%s.pppenable = ",cache); |
||||
|
switch(syscfg->cnfgdata.pppenable) { |
||||
|
case TRUE: printf("TRUE"); |
||||
|
break; |
||||
|
case FALSE: printf("FALSE"); |
||||
|
break; |
||||
|
default: printf("Unknown!!"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
if(TRUE == syscfg->cnfgdata.pppenable) { |
||||
|
|
||||
|
printf("%s.pppsdenable = ",cache); |
||||
|
switch(syscfg->cnfgdata.pppsdenable) { |
||||
|
case TRUE: printf("TRUE"); |
||||
|
break; |
||||
|
case FALSE: printf("FALSE"); |
||||
|
break; |
||||
|
default: printf("Unknown!!"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.pppsdtrace = ",cache); |
||||
|
switch(syscfg->cnfgdata.pppsdtrace) { |
||||
|
case 0: printf("SILENT"); |
||||
|
break; |
||||
|
case 1: printf("ERRORS"); |
||||
|
break; |
||||
|
case 2: printf("EVERYTHING"); |
||||
|
break; |
||||
|
default: printf("Unknown!!"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
|
||||
|
printf("%s.pppcapacity = %d",cache, |
||||
|
syscfg->cnfgdata.prpsdcapacity); |
||||
|
pager(); |
||||
|
|
||||
|
printf("%s.pppconenable = ",cache); |
||||
|
switch(syscfg->cnfgdata.pppconenable) { |
||||
|
case TRUE: printf("TRUE"); |
||||
|
break; |
||||
|
case FALSE: printf("FALSE"); |
||||
|
break; |
||||
|
default: printf("Unknown!!"); |
||||
|
break; |
||||
|
} |
||||
|
pager(); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
/********************/ |
||||
|
/* eof - cnamept4.c */ |
||||
|
/********************/ |
||||
|
|
||||
|
|
||||
@ -0,0 +1,73 @@ |
|||||
|
/* cnfgdata.h 6/04/2012 dwg - */ |
||||
|
|
||||
|
struct CNFGDATA { |
||||
|
unsigned char rmj; |
||||
|
unsigned char rmn; |
||||
|
unsigned char rup; |
||||
|
unsigned char rtp; |
||||
|
unsigned char diskboot; |
||||
|
unsigned char devunit; |
||||
|
unsigned int bootlu; |
||||
|
unsigned char hour; |
||||
|
unsigned char minute; |
||||
|
unsigned char second; |
||||
|
unsigned char month; |
||||
|
unsigned char day; |
||||
|
unsigned char year; |
||||
|
unsigned char freq; |
||||
|
unsigned char platform; |
||||
|
unsigned char dioplat; |
||||
|
unsigned char vdumode; |
||||
|
unsigned int romsize; |
||||
|
unsigned int ramsize; |
||||
|
unsigned char clrramdk; |
||||
|
unsigned char dskyenable; |
||||
|
unsigned char uartenable; |
||||
|
unsigned char vduenable; |
||||
|
unsigned char fdenable; |
||||
|
unsigned char fdtrace; |
||||
|
unsigned char fdmedia; |
||||
|
unsigned char fdmediaalt; |
||||
|
unsigned char fdmauto; |
||||
|
unsigned char ideenable; |
||||
|
unsigned char idetrace; |
||||
|
unsigned char ide8bit; |
||||
|
unsigned int idecapacity; |
||||
|
unsigned char ppideenable; |
||||
|
unsigned char ppidetrace; |
||||
|
unsigned char ppide8bit; |
||||
|
unsigned int ppidecapacity; |
||||
|
unsigned char ppideslow; |
||||
|
unsigned char boottype; |
||||
|
unsigned char boottimeout; |
||||
|
unsigned char bootdefault; |
||||
|
unsigned int baudrate; |
||||
|
unsigned char ckdiv; |
||||
|
unsigned char memwait; |
||||
|
unsigned char iowait; |
||||
|
unsigned char cntlb0; |
||||
|
unsigned char cntlb1; |
||||
|
unsigned char sdenable; |
||||
|
unsigned char sdtrace; |
||||
|
unsigned int sdcapacity; |
||||
|
unsigned char sdcsio; |
||||
|
unsigned char sdcsiofast; |
||||
|
unsigned char defiobyte; |
||||
|
unsigned char termtype; |
||||
|
unsigned int revision; |
||||
|
unsigned char prpsdenable; |
||||
|
unsigned char prpsdtrace; |
||||
|
unsigned int prpsdcapacity; |
||||
|
unsigned char prpconenable; |
||||
|
unsigned int biossize; |
||||
|
unsigned char pppenable; |
||||
|
unsigned char pppsdenable; |
||||
|
unsigned char pppsdtrace; |
||||
|
unsigned int pppsdcapacity; |
||||
|
unsigned char pppconenable; |
||||
|
unsigned char prpenable; |
||||
|
}; |
||||
|
|
||||
|
/********************/ |
||||
|
/* eof - cnfgdata.h */ |
||||
|
/********************/ |
||||
@ -0,0 +1,196 @@ |
|||||
|
/* cpmbios.h 3/11/2012 dwg - added CURDRV */ |
||||
|
|
||||
|
/*************************/ |
||||
|
/* BIOS Memory Locations */ |
||||
|
/*************************/ |
||||
|
|
||||
|
#define CURDRV 0x00004 |
||||
|
#define BIOSAD 0x0e600 |
||||
|
|
||||
|
#define pBOOT 0x0E600 |
||||
|
#define pWBOOT 0x0E603 |
||||
|
#define pCONST 0x0E606 |
||||
|
#define pCONIN 0x0E609 |
||||
|
#define pCONOUT 0x0E60C |
||||
|
#define pLIST 0x0E60F |
||||
|
#define pPUNCH 0x0E612 |
||||
|
#define pREADER 0x0E615 |
||||
|
#define pHOME 0x0E618 |
||||
|
#define pSELDSK 0x0E61B |
||||
|
#define pSETTRK 0x0E61E |
||||
|
#define pSETSEC 0x0E621 |
||||
|
#define pSETDMA 0x0E624 |
||||
|
#define pREAD 0x0E627 |
||||
|
#define pWRITE 0x0E62A |
||||
|
#define pLISTST 0x0E62D |
||||
|
#define pSECTRN 0x0E630 |
||||
|
#define pBNKSEL 0x0E633 |
||||
|
#define pGETLU 0x0E636 |
||||
|
#define pSETLU 0x0E639 |
||||
|
#define pGETINFO 0x0E63C |
||||
|
|
||||
|
struct JMP { |
||||
|
unsigned char opcode; |
||||
|
unsigned int address; |
||||
|
}; |
||||
|
|
||||
|
struct BIOS { |
||||
|
struct JMP boot; |
||||
|
struct JMP wboot; |
||||
|
struct JMP const; |
||||
|
struct JMP conin; |
||||
|
struct JMP conout; |
||||
|
struct JMP list; |
||||
|
struct JMP punch; |
||||
|
struct JMP reader; |
||||
|
struct JMP home; |
||||
|
struct JMP seldsk; |
||||
|
struct JMP settrk; |
||||
|
struct JMP setsec; |
||||
|
struct JMP setdma; |
||||
|
struct JMP read; |
||||
|
struct JMP write; |
||||
|
struct JMP listst; |
||||
|
struct JMP sectrn; |
||||
|
struct JMP bnksel; |
||||
|
struct JMP getlu; |
||||
|
struct JMP setlu; |
||||
|
struct JMP getinfo; |
||||
|
struct JMP rsvd1; |
||||
|
struct JMP rsvd2; |
||||
|
struct JMP rsvd3; |
||||
|
struct JMP rsvd4; |
||||
|
|
||||
|
char diskboot; |
||||
|
char bootdrive; |
||||
|
char devunit; |
||||
|
|
||||
|
char rmj; |
||||
|
char rmn; |
||||
|
char rup; |
||||
|
char rtp; |
||||
|
}; |
||||
|
|
||||
|
|
||||
|
struct DPH { |
||||
|
unsigned int xlt; |
||||
|
unsigned int rv1; |
||||
|
unsigned int rv2; |
||||
|
unsigned int rv3; |
||||
|
unsigned int dbf; |
||||
|
unsigned int dpb; |
||||
|
unsigned int csv; |
||||
|
unsigned int alv; |
||||
|
unsigned char sigl; |
||||
|
unsigned char sigu; |
||||
|
unsigned int current; |
||||
|
unsigned int number; |
||||
|
}; |
||||
|
|
||||
|
struct DPB { |
||||
|
unsigned int spt; |
||||
|
unsigned char bsh; |
||||
|
unsigned char blm; |
||||
|
unsigned char exm; |
||||
|
unsigned int dsm; |
||||
|
unsigned int drm; |
||||
|
unsigned char al0; |
||||
|
unsigned char al1; |
||||
|
unsigned int cks; |
||||
|
unsigned int off; |
||||
|
}; |
||||
|
|
||||
|
/* bioscall.h 3/10/2012 dwg - header file for bdoscall */ |
||||
|
|
||||
|
extern char irega; |
||||
|
extern unsigned int iregbc; |
||||
|
extern unsigned int iregde; |
||||
|
extern unsigned int ireghl; |
||||
|
extern bioscall(); |
||||
|
|
||||
|
|
||||
|
/* bdoscall.h 3/10/2012 dwg - header file for bdoscall */ |
||||
|
|
||||
|
extern char drega; |
||||
|
extern unsigned int dregbc; |
||||
|
extern unsigned int dregde; |
||||
|
extern unsigned int dreghl; |
||||
|
extern bdoscall(); |
||||
|
|
||||
|
/* diagnose.h 5/23/2012 dwg - */ |
||||
|
|
||||
|
extern char hrega; |
||||
|
extern unsigned int hregbc; |
||||
|
extern unsigned int hregde; |
||||
|
extern unsigned int hreghl; |
||||
|
|
||||
|
extern diagnose(); |
||||
|
|
||||
|
/* ctermcap.h 3/11/2012 dwg - declarations for termal capability */ |
||||
|
|
||||
|
extern crtinit(); |
||||
|
extern crtclr(); |
||||
|
extern crtlc(); |
||||
|
|
||||
|
/* cpmbdos.h */ |
||||
|
#define TERMCPM 0 |
||||
|
#define CONIN 1 |
||||
|
#define CWRITE 2 |
||||
|
#define DIRCONIO 6 |
||||
|
#define PRINTSTR 9 |
||||
|
#define RDCONBUF 10 |
||||
|
#define GETCONST 11 |
||||
|
#define RETVERNUM 12 |
||||
|
#define RESDISKSYS 13 |
||||
|
#define SELECTDISK 14 |
||||
|
#define FOPEN 15 |
||||
|
#define FCLOSE 16 |
||||
|
#define SEARCHFIRST 17 |
||||
|
#define SEARCHNEXT 18 |
||||
|
#define FDELETE 19 |
||||
|
#define FREADSEQ 20 |
||||
|
#define FWRITESEQ 21 |
||||
|
#define FMAKEFILE 22 |
||||
|
#define FRENAME 23 |
||||
|
#define RETLOGINVEC 24 |
||||
|
#define RETCURRDISK 25 |
||||
|
#define SETDMAADDR 26 |
||||
|
#define GETALLOCVEC 27 |
||||
|
#define WRPROTDISK 28 |
||||
|
#define GETROVECTOR 29 |
||||
|
#define FSETATTRIB 30 |
||||
|
#define GETDPBADDR 31 |
||||
|
#define SETGETUSER 32 |
||||
|
#define FREADRANDOM 33 |
||||
|
#define FWRITERAND 34 |
||||
|
#define FCOMPSIZE 35 |
||||
|
#define SETRANDREC 36 |
||||
|
#define RESETDRIVE 37 |
||||
|
#define WRRANDFILL 38 |
||||
|
|
||||
|
#define DRIVEA 0 |
||||
|
|
||||
|
/* dphmap.h 5/29/2012 dwg - declaration of DPH MAP structure */ |
||||
|
|
||||
|
struct DPHMAP { |
||||
|
struct DPH * drivea; |
||||
|
struct DPH * driveb; |
||||
|
struct DPH * drivec; |
||||
|
struct DPH * drived; |
||||
|
struct DPH * drivee; |
||||
|
struct DPH * drivef; |
||||
|
struct DPH * driveg; |
||||
|
struct DPH * driveh; |
||||
|
} * pDPHMAP; |
||||
|
|
||||
|
struct DPHMAP * pDPHVEC[MAXDRIVE]; |
||||
|
|
||||
|
|
||||
|
/******************/ |
||||
|
/* eof - dphmap.h */ |
||||
|
/******************/ |
||||
|
|
||||
|
/*****************/ |
||||
|
/* eof - cpm80.h */ |
||||
|
/*****************/ |
||||
|
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,8 @@ |
|||||
|
#ifndef NDEBUG |
||||
|
#ifndef stderr |
||||
|
#include <stdio.h> |
||||
|
#endif |
||||
|
#define assert(x) if (!(x)) {fprintf(stderr,"Assertion failed: x, file %s, line %d\n",__FILE__,__LINE__); exit(1);} |
||||
|
#else |
||||
|
#define assert(x) |
||||
|
#endif |
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,20 @@ |
|||||
|
/* Copyright (C) 1984 by Manx Software Systems */ |
||||
|
|
||||
|
extern char ctp_[]; |
||||
|
|
||||
|
#define isalpha(x) (ctp_[(x)+1]&0x03) |
||||
|
#define isupper(x) (ctp_[(x)+1]&0x01) |
||||
|
#define islower(x) (ctp_[(x)+1]&0x02) |
||||
|
#define isdigit(x) (ctp_[(x)+1]&0x04) |
||||
|
#define isxdigit(x) (ctp_[(x)+1]&0x08) |
||||
|
#define isalnum(x) (ctp_[(x)+1]&0x07) |
||||
|
#define isspace(x) (ctp_[(x)+1]&0x10) |
||||
|
#define ispunct(x) (ctp_[(x)+1]&0x40) |
||||
|
#define iscntrl(x) (ctp_[(x)+1]&0x20) |
||||
|
#define isprint(x) (ctp_[(x)+1]&0xc7) |
||||
|
#define isgraph(x) (ctp_[(x)+1]&0x47) |
||||
|
#define isascii(x) (((x)&0x80)==0) |
||||
|
|
||||
|
#define toascii(x) ((x)&127) |
||||
|
#define _tolower(x) ((x)|0x20) |
||||
|
#define _toupper(x) ((x)&0x5f) |
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,26 @@ |
|||||
|
/* Copyright (C) 1983 by Manx Software Systems */ |
||||
|
|
||||
|
#define TIOCGETP 0 /* read contents of tty control structure */ |
||||
|
#define TIOCSETP 1 /* set contents of tty control structure */ |
||||
|
#define TIOCSETN 1 /* ditto only don't wait for output to flush */ |
||||
|
|
||||
|
/* special codes for MSDOS 2.x only */ |
||||
|
#define TIOCREAD 2 /* read control info from device */ |
||||
|
#define TIOCWRITE 3 /* write control info to device */ |
||||
|
#define TIOCDREAD 4 /* same as 2 but for drives */ |
||||
|
#define TIOCDWRITE 5 /* same as 3 but for drives */ |
||||
|
#define GETISTATUS 6 /* get input status */ |
||||
|
#define GETOSTATUS 7 /* get output status */ |
||||
|
|
||||
|
struct sgttyb { |
||||
|
short sg_flags; /* control flags */ |
||||
|
char sg_erase; /* ignored */ |
||||
|
char sg_kill; /* ignored */ |
||||
|
}; |
||||
|
|
||||
|
/* settings for flags */ |
||||
|
#define RAW 0x20 /* no echo or mapping of input/output BDOS(6) */ |
||||
|
|
||||
|
/* Refer to the MSDOS technical reference for detailed information on
|
||||
|
* the remaining flags. |
||||
|
*/ |
||||
@ -0,0 +1,29 @@ |
|||||
|
extern int errno; |
||||
|
extern char *sys_errlist[]; |
||||
|
extern int sys_nerr; |
||||
|
|
||||
|
/* MsDos return codes */ |
||||
|
#define EINVAL 1 |
||||
|
#define ENOENT 2 |
||||
|
#define ENOTDIR 3 |
||||
|
#define EMFILE 4 |
||||
|
#define EACCES 5 |
||||
|
#define EBADF 6 |
||||
|
#define EARENA 7 |
||||
|
#define ENOMEM 8 |
||||
|
#define EFAULT 9 |
||||
|
#define EINVENV 10 |
||||
|
#define EBADFMT 11 |
||||
|
#define EINVACC 12 |
||||
|
#define EINVDAT 13 |
||||
|
#define ENODEV 15 |
||||
|
#define ERMCD 16 |
||||
|
#define EXDEV 17 |
||||
|
#define ENOMORE 18 |
||||
|
|
||||
|
/* additional codes used by Aztec C */ |
||||
|
#define EEXIST 19 |
||||
|
#define ENOTTY 20 |
||||
|
/* used by the math library */ |
||||
|
#define ERANGE 21 |
||||
|
#define EDOM 22 |
||||
@ -0,0 +1,7 @@ |
|||||
|
#define O_RDONLY 0 |
||||
|
#define O_WRONLY 1 |
||||
|
#define O_RDWR 2 |
||||
|
#define O_CREAT 0x0100 |
||||
|
#define O_TRUNC 0x0200 |
||||
|
#define O_EXCL 0x0400 |
||||
|
#define O_APPEND 0x0800 |
||||
Binary file not shown.
@ -0,0 +1,16 @@ |
|||||
|
main() |
||||
|
{ |
||||
|
char buffer[100]; |
||||
|
|
||||
|
/* set to 25 row x 80 column monochrome mode 6 (HIRES) */ |
||||
|
mode('H'); |
||||
|
printf("Please enter your name: "); |
||||
|
gets(buffer); |
||||
|
/* set to 25 row x 40 column 4-color mode 4 (MEDRES) */ |
||||
|
mode('M'); |
||||
|
printf("Hello %s!\nWelcome to the growing family of\nAZTEC C users...\n", |
||||
|
buffer); |
||||
|
getchar(); |
||||
|
/* set to 25 row x 80 column color text mode 3 (LOWRES) */ |
||||
|
mode('L'); |
||||
|
} |
||||
Binary file not shown.
Binary file not shown.
@ -0,0 +1,4 @@ |
|||||
|
main() |
||||
|
{ |
||||
|
printf("Hello Woprd!!"); |
||||
|
} |
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,82 @@ |
|||||
|
/* Copyright (C) 1982 by Manx Software Systems */ |
||||
|
/*
|
||||
|
* if MAXCHAN is changed then the initialization of chantab in croot.c |
||||
|
* should be adjusted so that it initializes EXACTLY MAXCHAN elements of |
||||
|
* the array. If this is not done, the I/O library may exhibit |
||||
|
* strange behavior. |
||||
|
*/ |
||||
|
#define MAXCHAN 11 /* maximum number of I/O channels */ |
||||
|
|
||||
|
/*
|
||||
|
* argument to device routines. |
||||
|
* this is a typedef to allow future redeclaration to guarantee |
||||
|
* enough space to store either a pointer or an integer. |
||||
|
*/ |
||||
|
typedef char *_arg; |
||||
|
|
||||
|
/*
|
||||
|
* device control structure |
||||
|
*/ |
||||
|
struct device { |
||||
|
char d_read; |
||||
|
char d_write; |
||||
|
char d_ioctl; /* used by character special devices (eg CON:) */ |
||||
|
char d_seek; /* used by random I/O devices (eg: a file) */ |
||||
|
int (*d_open)(); /* for special open handling */ |
||||
|
}; |
||||
|
|
||||
|
/*
|
||||
|
* device table, contains names and pointers to device entries |
||||
|
*/ |
||||
|
struct devtabl { |
||||
|
char *d_name; |
||||
|
struct device *d_dev; |
||||
|
_arg d_arg; |
||||
|
}; |
||||
|
|
||||
|
/*
|
||||
|
* channel table: relates fd's to devices |
||||
|
*/ |
||||
|
struct channel { |
||||
|
char c_read; |
||||
|
char c_write; |
||||
|
char c_ioctl; |
||||
|
char c_seek; |
||||
|
int (*c_close)(); |
||||
|
_arg c_arg; |
||||
|
} ; |
||||
|
extern struct channel chantab[MAXCHAN]; |
||||
|
|
||||
|
struct fcb { |
||||
|
char f_driv; |
||||
|
char f_name[8]; |
||||
|
char f_type[3]; |
||||
|
char f_ext; |
||||
|
char f_resv[2]; |
||||
|
char f_rc; |
||||
|
char f_sydx[16]; |
||||
|
char f_cr; |
||||
|
unsigned f_record; char f_overfl; |
||||
|
}; |
||||
|
|
||||
|
struct fcbtab { |
||||
|
struct fcb fcb; |
||||
|
char offset; |
||||
|
char flags; |
||||
|
char user; |
||||
|
}; |
||||
|
|
||||
|
#define OPNFIL 15 |
||||
|
#define CLSFIL 16 |
||||
|
#define DELFIL 19 |
||||
|
#define READSQ 20 |
||||
|
#define WRITSQ 21 |
||||
|
#define MAKFIL 22 |
||||
|
#define SETDMA 26 |
||||
|
#define GETUSR 32 |
||||
|
#define READRN 33 |
||||
|
#define WRITRN 34 |
||||
|
#define FILSIZ 35 |
||||
|
#define SETREC 36 |
||||
|
|
||||
|
#define Wrkbuf ((char *)0x80) |
||||
@ -0,0 +1,41 @@ |
|||||
|
/* Copyright (C) 1981, 1982 by Manx Software Systems */ |
||||
|
|
||||
|
extern int errno; |
||||
|
#define FLT_FAULT 0 /* vector for floating-point faults */ |
||||
|
extern int (*Sysvec[])(); |
||||
|
|
||||
|
#define NULL 0 |
||||
|
#define EOF -1 |
||||
|
#define BUFSIZ 1024 |
||||
|
|
||||
|
#define _BUSY 0x01 |
||||
|
#define _ALLBUF 0x02 |
||||
|
#define _DIRTY 0x04 |
||||
|
#define _EOF 0x08 |
||||
|
#define _IOERR 0x10 |
||||
|
#define _TEMP 0x20 /* temporary file (delete on close) */ |
||||
|
|
||||
|
typedef struct { |
||||
|
char *_bp; /* current position in buffer */ |
||||
|
char *_bend; /* last character in buffer + 1 */ |
||||
|
char *_buff; /* address of buffer */ |
||||
|
char _flags; /* open mode, etc. */ |
||||
|
char _unit; /* token returned by open */ |
||||
|
char _bytbuf; /* single byte buffer for unbuffer streams */ |
||||
|
int _buflen; /* length of buffer */ |
||||
|
char *_tmpname; /* name of file for temporaries */ |
||||
|
} FILE; |
||||
|
|
||||
|
extern FILE Cbuffs[]; |
||||
|
extern char *Stdbufs; /* free list of buffers */ |
||||
|
long ftell(); |
||||
|
|
||||
|
#define stdin (&Cbuffs[0]) |
||||
|
#define stdout (&Cbuffs[1]) |
||||
|
#define stderr (&Cbuffs[2]) |
||||
|
#define getchar() agetc(stdin) |
||||
|
#define putchar(c) aputc(c, stdout) |
||||
|
#define feof(fp) (((fp)->_flags&_EOF)!=0) |
||||
|
#define ferror(fp) (((fp)->_flags&_IOERR)!=0) |
||||
|
#define clearerr(fp) ((fp)->_flags &= ~(_IOERR|_EOF)) |
||||
|
#define fileno(fp) ((fp)->_unit) |
||||
@ -0,0 +1,210 @@ |
|||||
|
nlist |
||||
|
; Copyright (C) 1985 by Manx Software Systems, Inc. |
||||
|
; :ts=8 |
||||
|
ifndef MODEL |
||||
|
MODEL equ 0 |
||||
|
endif |
||||
|
if MODEL and 1 |
||||
|
largecode |
||||
|
FARPROC equ 1 |
||||
|
FPTRSIZE equ 4 |
||||
|
else |
||||
|
FPTRSIZE equ 2 |
||||
|
endif |
||||
|
if MODEL and 2 |
||||
|
LONGPTR equ 1 |
||||
|
endif |
||||
|
|
||||
|
;this macro to be used on returning |
||||
|
;restores bp and registers |
||||
|
pret macro |
||||
|
if havbp |
||||
|
pop bp |
||||
|
endif |
||||
|
ret |
||||
|
endm |
||||
|
|
||||
|
internal macro pname |
||||
|
public pname |
||||
|
pname proc |
||||
|
endm |
||||
|
|
||||
|
intrdef macro pname |
||||
|
public pname |
||||
|
ifdef FARPROC |
||||
|
pname label far |
||||
|
else |
||||
|
pname label near |
||||
|
endif |
||||
|
endm |
||||
|
|
||||
|
procdef macro pname, args |
||||
|
public pname&_ |
||||
|
ifdef FARPROC |
||||
|
_arg = 6 |
||||
|
pname&_ proc far |
||||
|
else |
||||
|
_arg = 4 |
||||
|
pname&_ proc near |
||||
|
endif |
||||
|
ifnb <args> |
||||
|
push bp |
||||
|
mov bp,sp |
||||
|
havbp = 1 |
||||
|
decll <args> |
||||
|
else |
||||
|
havbp = 0 |
||||
|
endif |
||||
|
endm |
||||
|
|
||||
|
entrdef macro pname, args |
||||
|
public pname&_ |
||||
|
ifdef FARPROC |
||||
|
_arg = 6 |
||||
|
pname&_: |
||||
|
else |
||||
|
_arg = 4 |
||||
|
pname&_: |
||||
|
endif |
||||
|
ifnb <args> |
||||
|
if havbp |
||||
|
push bp |
||||
|
mov bp,sp |
||||
|
else |
||||
|
error must declare main proc with args, if entry has args |
||||
|
endif |
||||
|
decll <args> |
||||
|
endif |
||||
|
endm |
||||
|
|
||||
|
;this macro equates 'aname' to arg on stack |
||||
|
decl macro aname, type |
||||
|
;;'byte' or anything else |
||||
|
havtyp = 0 |
||||
|
ifidn <type>,<byte> |
||||
|
aname equ byte ptr _arg[bp] |
||||
|
_arg = _arg + 2 |
||||
|
havtyp = 1 |
||||
|
endif |
||||
|
ifidn <type>,<dword> |
||||
|
aname equ dword ptr _arg[bp] |
||||
|
_arg = _arg + 4 |
||||
|
havtyp = 1 |
||||
|
endif |
||||
|
ifidn <type>,<cdouble> |
||||
|
aname equ qword ptr _arg[bp] |
||||
|
_arg = _arg + 8 |
||||
|
havtyp = 1 |
||||
|
endif |
||||
|
ifidn <type>, <ptr> |
||||
|
ifdef LONGPTR |
||||
|
aname equ dword ptr _arg[bp] |
||||
|
_arg = _arg + 4 |
||||
|
else |
||||
|
aname equ word ptr _arg[bp] |
||||
|
_arg = _arg + 2 |
||||
|
endif |
||||
|
havtyp = 1 |
||||
|
endif |
||||
|
ifidn <type>, <fptr> |
||||
|
ifdef FARPROC |
||||
|
aname equ dword ptr _arg[bp] |
||||
|
_arg = _arg + 4 |
||||
|
else |
||||
|
aname equ word ptr _arg[bp] |
||||
|
_arg = _arg + 2 |
||||
|
endif |
||||
|
havtyp = 1 |
||||
|
endif |
||||
|
ifidn <type>, <word> |
||||
|
aname equ word ptr _arg[bp] |
||||
|
_arg = _arg + 2 |
||||
|
havtyp = 1 |
||||
|
endif |
||||
|
ife havtyp |
||||
|
error -- type is unknown. |
||||
|
endif |
||||
|
endm |
||||
|
|
||||
|
;this macro loads an arg pointer into DEST, with optional SEGment |
||||
|
ldptr macro dest, argname, seg |
||||
|
ifdef LONGPTR |
||||
|
ifnb <seg> ;;get segment if specified |
||||
|
ifidn <seg>,<es> |
||||
|
les dest,argname |
||||
|
else |
||||
|
ifidn <seg>,<ds> |
||||
|
lds dest,argname |
||||
|
else |
||||
|
mov dest, word ptr argname |
||||
|
mov seg, word ptr argname[2] |
||||
|
endif |
||||
|
endif |
||||
|
else |
||||
|
ifidn <dest>,<si> ;;si gets seg in ds |
||||
|
lds si, argname |
||||
|
else |
||||
|
ifidn <dest>,<di> ;;or, es:di |
||||
|
les di, argname |
||||
|
else |
||||
|
garbage error: no seg for long pointer |
||||
|
endif |
||||
|
endif |
||||
|
endif |
||||
|
else |
||||
|
mov dest, word ptr argname ;;get the pointer |
||||
|
ENDIF |
||||
|
ENDM |
||||
|
|
||||
|
decll macro list |
||||
|
IRP i,<list> |
||||
|
decl i |
||||
|
ENDM |
||||
|
ENDM |
||||
|
|
||||
|
pend macro pname |
||||
|
pname&_ endp |
||||
|
endm |
||||
|
|
||||
|
retptrm macro src,seg |
||||
|
mov ax, word ptr src |
||||
|
ifdef LONGPTR |
||||
|
mov dx, word ptr src+2 |
||||
|
endif |
||||
|
endm |
||||
|
|
||||
|
retptrr macro src,seg |
||||
|
mov ax,src |
||||
|
ifdef LONGPTR |
||||
|
ifnb <seg> |
||||
|
mov dx, seg |
||||
|
endif |
||||
|
endif |
||||
|
endm |
||||
|
|
||||
|
retnull macro |
||||
|
ifdef LONGPTR |
||||
|
sub dx,dx |
||||
|
endif |
||||
|
sub ax,ax |
||||
|
endm |
||||
|
|
||||
|
pushds macro |
||||
|
ifdef LONGPTR |
||||
|
push ds |
||||
|
endif |
||||
|
endm |
||||
|
|
||||
|
popds macro |
||||
|
ifdef LONGPTR |
||||
|
pop ds |
||||
|
endif |
||||
|
endm |
||||
|
|
||||
|
finish macro |
||||
|
codeseg ends |
||||
|
endm |
||||
|
|
||||
|
list |
||||
|
codeseg segment byte public 'code' |
||||
|
assume cs:codeseg |
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,8 @@ |
|||||
|
|
||||
|
|
||||
|
hello.cmd: hello.c |
||||
|
cc hello |
||||
|
ln -o hello.cmd hello.o -lc |
||||
|
|
||||
|
clean: |
||||
|
erase hello.cmd |
||||
@ -0,0 +1 @@ |
|||||
|
z:mount i /Users/doug/Downloads/azcpm32d |
||||
@ -0,0 +1,11 @@ |
|||||
|
double sin(), cos(), tan(), cotan(); |
||||
|
double asin(), acos(), atan(), atan2(); |
||||
|
double ldexp(), frexp(), modf(); |
||||
|
double floor(), ceil(), fabs(); |
||||
|
double log(), log10(), exp(), sqrt(), pow(); |
||||
|
double sinh(), cosh(), tanh(); |
||||
|
|
||||
|
#define HUGE_VAL 1.79e+308 |
||||
|
#define LOGHUGE 709.778 |
||||
|
#define TINY_VAL 2.2e-308 |
||||
|
#define LOGTINY -708.396 |
||||
@ -0,0 +1,2 @@ |
|||||
|
extern char *memcpy(), *memchr(), *memcpy(), memset(); |
||||
|
extern int memcmp(); |
||||
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue