home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-06-23 | 88.9 KB | 3,407 lines |
- *** 1.4 1993/03/08 21:36:20
- --- makefile 1993/04/15 00:35:08
- ***************
- *** 36,43 ****
-
- # add -DMULTITOS for a MultiTOS kernel
- # add -DONLY030 for a version of MiNT that needs a 680x0, x>=3
-
- ! DEFS = -DMULTITOS
- #DEFS030 = -DMULTITOS -DONLY030
- DEFS030 = -DONLY030
-
- --- 36,44 ----
-
- # add -DMULTITOS for a MultiTOS kernel
- # add -DONLY030 for a version of MiNT that needs a 680x0, x>=3
- + # add -DDEBUG_INFO for debugging information
-
- ! DEFS = -DMULTITOS -DDEBUG_INFO
- #DEFS030 = -DMULTITOS -DONLY030
- DEFS030 = -DONLY030
-
- ***************
- *** 73,79 ****
- OBJS = $(COBJS) $(SOBJS)
- OBJS030 = $(COBJS030) $(SOBJS030)
-
- ! all: mint.prg mint030.prg
-
- mint.prg: $(OBJS)
- $(CC) $(CFLAGS) -o mint.prg $(OBJS) $(LIBS)
- --- 74,80 ----
- OBJS = $(COBJS) $(SOBJS)
- OBJS030 = $(COBJS030) $(SOBJS030)
-
- ! #all: mint.prg mint030.prg
-
- mint.prg: $(OBJS)
- $(CC) $(CFLAGS) -o mint.prg $(OBJS) $(LIBS)
- *** 1.4 1993/03/08 21:36:20
- --- makefile.lcc 1993/05/25 16:59:14
- ***************
- *** 36,44 ****
-
- # add -DMULTITOS for a MultiTOS kernel
- # add -DONLY030 for a version of MiNT that needs a 680x0, x>=3
-
- ! DEFS =
- ! DEFS030 = -DONLY030
-
- SYMS = -Hmint.sym
-
- --- 36,45 ----
-
- # add -DMULTITOS for a MultiTOS kernel
- # add -DONLY030 for a version of MiNT that needs a 680x0, x>=3
- + # add -DDEBUG_INFO for debugging information
-
- ! DEFS = -DDEBUG_INFO
- ! DEFS030 = -DONLY030 -DDEBUG_INFO
-
- SYMS = -Hmint.sym
-
- ***************
- *** 56,62 ****
- COPTS = $(OPTS) $(MODEL) $(ERRORS) $(DEFS)
- CFLAGS = $(COPTS) $(SYMS)
- ASFLAGS = $(ASOPTS) $(DEFS)
- ! CFLAGS030 = $(OPTS) $(MODEL030) $(ERRORS) $(DEFS030)
- ASFLAGS030 = -m3 $(ASOPTS) $(DEFS030)
-
- LDFLAGS = -t=
- --- 57,64 ----
- COPTS = $(OPTS) $(MODEL) $(ERRORS) $(DEFS)
- CFLAGS = $(COPTS) $(SYMS)
- ASFLAGS = $(ASOPTS) $(DEFS)
- ! COPTS030 = $(OPTS) $(MODEL030) $(ERRORS) $(DEFS030)
- ! CFLAGS030 = $(COPTS030) $(SYMS)
- ASFLAGS030 = -m3 $(ASOPTS) $(DEFS030)
-
- LDFLAGS = -t=
- ***************
- *** 213,219 ****
- #
- # macros for cleaning up
- #
- ! GENFILES= $(OBJS) $(OBJS030) $(ATRANSOBJ) $(ATRANS) $(GENMAGICPRG) $(YTABC) $(YTABH) magic.i __asm.o
- EXTRAS= asmtab.c asmtab.h mint.prg mint030.prg mint.sym
-
- clean:
- --- 215,222 ----
- #
- # macros for cleaning up
- #
- ! GENFILES= $(OBJS) $(OBJS030) $(ATRANSOBJ) $(ATRANS) $(GENMAGICPRG) \
- ! $(YTABC) $(YTABH) magic.i __asm.o genmagic.o
- EXTRAS= asmtab.c asmtab.h mint.prg mint030.prg mint.sym
-
- clean:
- *** 1.4 1993/03/08 21:36:20
- --- asm.y 1993/05/25 16:40:10
- ***************
- *** 73,78 ****
- --- 73,90 ----
- free($1); free($3); free($5); }
- | basic '{' basic ':' basic '}' {$$ = bitfield($1, $3, $5);
- free($1); free($3); free($5); }
- + | '(' '[' basic ',' basic ']' ',' basic ',' basic ')'
- + { $$=postindex($3,$5,$8,$10);
- + free($3); free($5); free($8); free($10); }
- + | '(' '[' basic ',' basic ',' basic ']' ',' basic ')'
- + { $$=preindex($3,$5,$7,$10);
- + free($3); free($5); free($7); free($10); }
- + | '(' '[' basic ']' ')'
- + { $$=postindex0($3);
- + free($3); }
- + | '(' '[' basic ']' ',' basic ')'
- + { $$=postindex1($3,$6);
- + free($3); free($6); }
- ;
-
- basic: basexpr { $$ = $1; }
- ***************
- *** 126,132 ****
- jmp_buf save;
- FILE *oldin, *f;
-
- ! f = fopen(file, "r");
- if (!f) {
- perror(file);
- return;
- --- 138,144 ----
- jmp_buf save;
- FILE *oldin, *f;
-
- ! f = fopen(file, "rt");
- if (!f) {
- perror(file);
- return;
- ***************
- *** 186,192 ****
- fprintf(stderr, "missing argument to -o\n");
- usage();
- }
- ! f = fopen(*argv, "w");
- if (!f)
- perror(*argv);
- else
- --- 198,204 ----
- fprintf(stderr, "missing argument to -o\n");
- usage();
- }
- ! f = fopen(*argv, "wt");
- if (!f)
- perror(*argv);
- else
- ***************
- *** 232,238 ****
- yyparse();
- } else {
- while(*argv) {
- ! if (!(f = fopen(*argv, "r")))
- perror(*argv);
- else {
- infile = f;
- --- 244,250 ----
- yyparse();
- } else {
- while(*argv) {
- ! if (!(f = fopen(*argv, "rt")))
- perror(*argv);
- else {
- infile = f;
- *** 1.4 1993/03/08 21:36:20
- --- asmtab.c 1993/05/25 17:16:14
- ***************
- *** 47,71 ****
-
-
-
- ! #define YYFINAL 87
- #define YYFLAG -32768
- ! #define YYNTBASE 25
-
- ! #define YYTRANSLATE(x) ((unsigned)(x) <= 267 ? yytranslate[x] : 35)
-
- static const char yytranslate[] = { 0,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- ! 2, 2, 2, 2, 15, 22, 2, 2, 2, 16,
- ! 17, 23, 18, 13, 19, 2, 24, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 14, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 20, 2, 21, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- --- 47,71 ----
-
-
-
- ! #define YYFINAL 108
- #define YYFLAG -32768
- ! #define YYNTBASE 27
-
- ! #define YYTRANSLATE(x) ((unsigned)(x) <= 267 ? yytranslate[x] : 37)
-
- static const char yytranslate[] = { 0,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- ! 2, 2, 2, 2, 15, 24, 2, 2, 2, 16,
- ! 17, 25, 18, 13, 19, 2, 26, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 14, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- + 22, 2, 23, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 20, 2, 21, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- ***************
- *** 88,114 ****
- 0, 1, 4, 6, 9, 12, 16, 21, 26, 33,
- 40, 45, 50, 53, 56, 59, 64, 68, 74, 76,
- 80, 82, 85, 87, 90, 94, 99, 104, 109, 114,
- ! 121, 128, 130, 134, 137, 139, 142, 144, 146, 148
- };
-
- #endif
-
- static const short yyrhs[] = { -1,
- ! 25, 26, 0, 5, 0, 30, 5, 0, 27, 5,
- ! 0, 30, 27, 5, 0, 8, 4, 6, 5, 0,
- 8, 4, 3, 5, 0, 7, 4, 3, 4, 6,
- ! 5, 0, 7, 4, 3, 4, 31, 5, 0, 9,
- 4, 3, 5, 0, 10, 4, 3, 5, 0, 11,
- ! 5, 0, 12, 5, 0, 4, 29, 0, 4, 29,
- ! 4, 28, 0, 3, 4, 29, 0, 3, 4, 29,
- ! 4, 28, 0, 31, 0, 31, 13, 28, 0, 3,
- ! 0, 3, 14, 0, 32, 0, 15, 32, 0, 16,
- ! 32, 17, 0, 16, 32, 17, 18, 0, 19, 16,
- ! 32, 17, 0, 32, 16, 32, 17, 0, 16, 32,
- ! 17, 3, 0, 32, 16, 32, 13, 32, 17, 0,
- ! 32, 20, 32, 14, 32, 21, 0, 33, 0, 33,
- ! 34, 32, 0, 19, 32, 0, 3, 0, 22, 3,
- ! 0, 18, 0, 19, 0, 23, 0, 24, 0
- };
-
- #if YYDEBUG != 0
- --- 88,119 ----
- 0, 1, 4, 6, 9, 12, 16, 21, 26, 33,
- 40, 45, 50, 53, 56, 59, 64, 68, 74, 76,
- 80, 82, 85, 87, 90, 94, 99, 104, 109, 114,
- ! 121, 128, 140, 152, 158, 166, 168, 172, 175, 177,
- ! 180, 182, 184, 186
- };
-
- #endif
-
- static const short yyrhs[] = { -1,
- ! 27, 28, 0, 5, 0, 32, 5, 0, 29, 5,
- ! 0, 32, 29, 5, 0, 8, 4, 6, 5, 0,
- 8, 4, 3, 5, 0, 7, 4, 3, 4, 6,
- ! 5, 0, 7, 4, 3, 4, 33, 5, 0, 9,
- 4, 3, 5, 0, 10, 4, 3, 5, 0, 11,
- ! 5, 0, 12, 5, 0, 4, 31, 0, 4, 31,
- ! 4, 30, 0, 3, 4, 31, 0, 3, 4, 31,
- ! 4, 30, 0, 33, 0, 33, 13, 30, 0, 3,
- ! 0, 3, 14, 0, 34, 0, 15, 34, 0, 16,
- ! 34, 17, 0, 16, 34, 17, 18, 0, 19, 16,
- ! 34, 17, 0, 34, 16, 34, 17, 0, 16, 34,
- ! 17, 3, 0, 34, 16, 34, 13, 34, 17, 0,
- ! 34, 20, 34, 14, 34, 21, 0, 16, 22, 34,
- ! 13, 34, 23, 13, 34, 13, 34, 17, 0, 16,
- ! 22, 34, 13, 34, 13, 34, 23, 13, 34, 17,
- ! 0, 16, 22, 34, 23, 17, 0, 16, 22, 34,
- ! 23, 13, 34, 17, 0, 35, 0, 35, 36, 34,
- ! 0, 19, 34, 0, 3, 0, 24, 3, 0, 18,
- ! 0, 19, 0, 25, 0, 26, 0
- };
-
- #if YYDEBUG != 0
- ***************
- *** 116,136 ****
- 22, 23, 26, 29, 30, 31, 33, 34, 35, 37,
- 39, 40, 41, 42, 45, 46, 49, 50, 55, 56,
- 60, 63, 65, 66, 67, 68, 69, 70, 71, 72,
- ! 74, 78, 79, 80, 82, 83, 86, 87, 88, 89
- };
-
- static const char * const yytname[] = { "$","error","$illegal.","WORD","WHITESP",
- "EOLN","STRING","DEFINECMD","INCLUDECMD","IFDEFCMD","IFNDEFCMD","ELSECMD","ENDIFCMD",
- ! "','","':'","'#'","'('","')'","'+'","'-'","'{'","'}'","'$'","'*'","'/'","input",
- ! "line","opline","ops","opcode","label","operand","basic","basexpr","op",""
- };
- #endif
-
- static const short yyr1[] = { 0,
- ! 25, 25, 26, 26, 26, 26, 26, 26, 26, 26,
- ! 26, 26, 26, 26, 27, 27, 27, 27, 28, 28,
- ! 29, 30, 31, 31, 31, 31, 31, 31, 31, 31,
- ! 31, 32, 32, 32, 33, 33, 34, 34, 34, 34
- };
-
- static const short yyr2[] = { 0,
- --- 121,144 ----
- 22, 23, 26, 29, 30, 31, 33, 34, 35, 37,
- 39, 40, 41, 42, 45, 46, 49, 50, 55, 56,
- 60, 63, 65, 66, 67, 68, 69, 70, 71, 72,
- ! 74, 76, 79, 82, 85, 90, 91, 92, 94, 95,
- ! 98, 99, 100, 101
- };
-
- static const char * const yytname[] = { "$","error","$illegal.","WORD","WHITESP",
- "EOLN","STRING","DEFINECMD","INCLUDECMD","IFDEFCMD","IFNDEFCMD","ELSECMD","ENDIFCMD",
- ! "','","':'","'#'","'('","')'","'+'","'-'","'{'","'}'","'['","']'","'$'","'*'",
- ! "'/'","input","line","opline","ops","opcode","label","operand","basic","basexpr",
- ! "op",""
- };
- #endif
-
- static const short yyr1[] = { 0,
- ! 27, 27, 28, 28, 28, 28, 28, 28, 28, 28,
- ! 28, 28, 28, 28, 29, 29, 29, 29, 30, 30,
- ! 31, 32, 33, 33, 33, 33, 33, 33, 33, 33,
- ! 33, 33, 33, 33, 33, 34, 34, 34, 35, 35,
- ! 36, 36, 36, 36
- };
-
- static const short yyr2[] = { 0,
- ***************
- *** 137,143 ****
- 0, 2, 1, 2, 2, 3, 4, 4, 6, 6,
- 4, 4, 2, 2, 2, 4, 3, 5, 1, 3,
- 1, 2, 1, 2, 3, 4, 4, 4, 4, 6,
- ! 6, 1, 3, 2, 1, 2, 1, 1, 1, 1
- };
-
- static const short yydefact[] = { 1,
- --- 145,152 ----
- 0, 2, 1, 2, 2, 3, 4, 4, 6, 6,
- 4, 4, 2, 2, 2, 4, 3, 5, 1, 3,
- 1, 2, 1, 2, 3, 4, 4, 4, 4, 6,
- ! 6, 11, 11, 5, 7, 1, 3, 2, 1, 2,
- ! 1, 1, 1, 1
- };
-
- static const short yydefact[] = { 1,
- ***************
- *** 144,207 ****
- 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,
- 2, 0, 0, 0, 22, 21, 15, 0, 0, 0,
- 0, 13, 14, 5, 0, 4, 0, 17, 0, 0,
- ! 0, 0, 0, 0, 6, 0, 35, 0, 0, 0,
- ! 0, 16, 19, 23, 32, 0, 8, 7, 11, 12,
- ! 18, 0, 24, 0, 0, 34, 36, 0, 0, 0,
- ! 37, 38, 39, 40, 0, 0, 0, 25, 0, 20,
- ! 0, 0, 33, 9, 10, 29, 26, 27, 0, 28,
- ! 0, 0, 0, 30, 31, 0, 0
- };
-
- static const short yydefgoto[] = { 1,
- ! 11, 12, 42, 17, 13, 43, 44, 45, 65
- };
-
- static const short yypact[] = {-32768,
- ! 47, 1, 3,-32768, 44, 49, 56, 57, 58, 59,
- ! -32768, 60, 8, 3,-32768,-32768, 62, 64, 30, 65,
- ! 66,-32768,-32768,-32768, 67,-32768, 68, 70, 13, 71,
- ! 72, 73, 74, 75,-32768, 13,-32768, 27, 27, 15,
- ! 69,-32768, 63, -12, 21, 4,-32768,-32768,-32768,-32768,
- ! -32768, 27,-32768, 45, 27,-32768,-32768, 13, 27, 27,
- ! -32768,-32768,-32768,-32768, 27, 76, 77, 6, 53,-32768,
- ! 25, 78,-32768,-32768,-32768,-32768,-32768,-32768, 27,-32768,
- ! 27, 79, 80,-32768,-32768, 83,-32768
- };
-
- static const short yypgoto[] = {-32768,
- ! -32768, 81, -33, 84,-32768, 38, -38,-32768,-32768
- };
-
-
- ! #define YYLAST 101
-
-
- static const short yytable[] = { 53,
- ! 54, 56, 51, 59, 14, 16, 37, 60, 76, 66,
- ! 25, 3, 26, 56, 15, 37, 69, 37, 38, 39,
- ! 71, 72, 40, 77, 70, 41, 73, 38, 39, 37,
- ! 55, 40, 31, 52, 41, 32, 41, 79, 61, 62,
- ! 82, 80, 83, 63, 64, 52, 86, 18, 41, 2,
- ! 3, 4, 19, 5, 6, 7, 8, 9, 10, 20,
- ! 21, 68, 22, 23, 24, 29, 30, 33, 34, 78,
- ! 14, 57, 35, 36, 46, 58, 47, 48, 49, 50,
- ! 74, 75, 87, 67, 0, 0, 0, 0, 0, 0,
- ! 0, 81, 0, 27, 0, 84, 0, 28, 0, 0,
- ! 85
- };
-
- static const short yycheck[] = { 38,
- ! 39, 40, 36, 16, 4, 3, 3, 20, 3, 6,
- ! 3, 4, 5, 52, 14, 3, 55, 3, 15, 16,
- ! 59, 60, 19, 18, 58, 22, 65, 15, 16, 3,
- ! 16, 19, 3, 19, 22, 6, 22, 13, 18, 19,
- ! 79, 17, 81, 23, 24, 19, 0, 4, 22, 3,
- ! 4, 5, 4, 7, 8, 9, 10, 11, 12, 4,
- ! 4, 17, 5, 5, 5, 4, 3, 3, 3, 17,
- ! 4, 3, 5, 4, 4, 13, 5, 5, 5, 5,
- ! 5, 5, 0, 46, -1, -1, -1, -1, -1, -1,
- ! -1, 14, -1, 13, -1, 17, -1, 14, -1, -1,
- ! 21
- };
- /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
- #line 3 "bison.simple"
- --- 153,222 ----
- 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,
- 2, 0, 0, 0, 22, 21, 15, 0, 0, 0,
- 0, 13, 14, 5, 0, 4, 0, 17, 0, 0,
- ! 0, 0, 0, 0, 6, 0, 39, 0, 0, 0,
- ! 0, 16, 19, 23, 36, 0, 8, 7, 11, 12,
- ! 18, 0, 24, 0, 0, 0, 38, 40, 0, 0,
- ! 0, 41, 42, 43, 44, 0, 0, 0, 0, 25,
- ! 0, 20, 0, 0, 37, 9, 10, 0, 0, 29,
- ! 26, 27, 0, 28, 0, 0, 0, 34, 0, 0,
- ! 0, 0, 0, 30, 31, 0, 0, 35, 0, 0,
- ! 0, 0, 0, 0, 33, 32, 0, 0
- };
-
- static const short yydefgoto[] = { 1,
- ! 11, 12, 42, 17, 13, 43, 44, 45, 66
- };
-
- static const short yypact[] = {-32768,
- ! 62, 3, 6,-32768, 40, 48, 54, 64, 70, 76,
- ! -32768, 77, 74, 6,-32768,-32768, 79, 7, 24, 81,
- ! 82,-32768,-32768,-32768, 83,-32768, 84, 86, 22, 87,
- ! 88, 89, 90, 91,-32768, 22,-32768, 36, 12, 32,
- ! 85,-32768, 73, 34, -13, 5,-32768,-32768,-32768,-32768,
- ! -32768, 36,-32768, 36, 75, 36,-32768,-32768, 22, 36,
- ! 36,-32768,-32768,-32768,-32768, 36, 92, 93, 19, 1,
- ! 94,-32768, 44, 95,-32768,-32768,-32768, 36, 63,-32768,
- ! -32768,-32768, 36,-32768, 36, 20, 36,-32768, 96, 78,
- ! 36, 97, 98,-32768,-32768, 80, 36,-32768, 99, 101,
- ! 36, 36, 100, 102,-32768,-32768, 104,-32768
- };
-
- static const short yypgoto[] = {-32768,
- ! -32768, 103, -33, 106,-32768, 55, -38,-32768,-32768
- };
-
-
- ! #define YYLAST 120
-
-
- static const short yytable[] = { 53,
- ! 55, 57, 51, 80, 62, 63, 14, 37, 16, 30,
- ! 67, 64, 65, 57, 37, 69, 15, 71, 81, 38,
- ! 39, 73, 74, 40, 37, 72, 31, 75, 41, 32,
- ! 52, 78, 91, 54, 37, 41, 38, 39, 37, 86,
- ! 40, 79, 92, 18, 89, 41, 90, 56, 93, 60,
- ! 52, 19, 96, 61, 52, 41, 83, 20, 100, 41,
- ! 84, 107, 103, 104, 2, 3, 4, 21, 5, 6,
- ! 7, 8, 9, 10, 22, 87, 25, 3, 26, 88,
- ! 23, 24, 29, 33, 34, 59, 14, 58, 35, 36,
- ! 46, 70, 47, 48, 49, 50, 76, 77, 95, 0,
- ! 68, 0, 99, 108, 0, 0, 0, 0, 85, 97,
- ! 82, 101, 94, 102, 98, 27, 105, 0, 106, 28
- };
-
- static const short yycheck[] = { 38,
- ! 39, 40, 36, 3, 18, 19, 4, 3, 3, 3,
- ! 6, 25, 26, 52, 3, 54, 14, 56, 18, 15,
- ! 16, 60, 61, 19, 3, 59, 3, 66, 24, 6,
- ! 19, 13, 13, 22, 3, 24, 15, 16, 3, 78,
- ! 19, 23, 23, 4, 83, 24, 85, 16, 87, 16,
- ! 19, 4, 91, 20, 19, 24, 13, 4, 97, 24,
- ! 17, 0, 101, 102, 3, 4, 5, 4, 7, 8,
- ! 9, 10, 11, 12, 5, 13, 3, 4, 5, 17,
- ! 5, 5, 4, 3, 3, 13, 4, 3, 5, 4,
- ! 4, 17, 5, 5, 5, 5, 5, 5, 21, -1,
- ! 46, -1, 23, 0, -1, -1, -1, -1, 14, 13,
- ! 17, 13, 17, 13, 17, 13, 17, -1, 17, 14
- };
- /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
- #line 3 "bison.simple"
- ***************
- *** 770,808 ****
- free(yyvsp[-5]); free(yyvsp[-3]); free(yyvsp[-1]); ;
- break;}
- case 32:
- ! #line 78 "asm.y"
- ! { yyval = yyvsp[0]; ;
- break;}
- case 33:
- ! #line 79 "asm.y"
- ! { yyval = concat3(yyvsp[-2], yyvsp[-1], yyvsp[0]); free(yyvsp[-2]); free(yyvsp[-1]); free(yyvsp[0]); ;
- break;}
- case 34:
- ! #line 80 "asm.y"
- ! { yyval = concat("-", yyvsp[0]); free(yyvsp[0]); ;
- break;}
- case 35:
- ! #line 82 "asm.y"
- ! {yyval = wordlookup(yyvsp[0]); free(yyvsp[0]); ;
- break;}
- case 36:
- ! #line 83 "asm.y"
- ! {yyval = hexop(yyvsp[0]); free(yyvsp[0]);;
- break;}
- case 37:
- ! #line 86 "asm.y"
- ! { yyval = strdup("+"); ;
- break;}
- case 38:
- ! #line 87 "asm.y"
- ! { yyval = strdup("-"); ;
- break;}
- case 39:
- ! #line 88 "asm.y"
- ! { yyval = strdup("*"); ;
- break;}
- case 40:
- ! #line 89 "asm.y"
- { yyval = strdup("/"); ;
- break;}
- }
- --- 785,843 ----
- free(yyvsp[-5]); free(yyvsp[-3]); free(yyvsp[-1]); ;
- break;}
- case 32:
- ! #line 77 "asm.y"
- ! { yyval=postindex(yyvsp[-8],yyvsp[-6],yyvsp[-3],yyvsp[-1]);
- ! free(yyvsp[-8]); free(yyvsp[-6]); free(yyvsp[-3]); free(yyvsp[-1]); ;
- break;}
- case 33:
- ! #line 80 "asm.y"
- ! { yyval=preindex(yyvsp[-8],yyvsp[-6],yyvsp[-4],yyvsp[-1]);
- ! free(yyvsp[-8]); free(yyvsp[-6]); free(yyvsp[-4]); free(yyvsp[-1]); ;
- break;}
- case 34:
- ! #line 83 "asm.y"
- ! { yyval=postindex0(yyvsp[-2]);
- ! free(yyvsp[-2]); ;
- break;}
- case 35:
- ! #line 86 "asm.y"
- ! { yyval=postindex1(yyvsp[-4],yyvsp[-1]);
- ! free(yyvsp[-4]); free(yyvsp[-1]); ;
- break;}
- case 36:
- ! #line 90 "asm.y"
- ! { yyval = yyvsp[0]; ;
- break;}
- case 37:
- ! #line 91 "asm.y"
- ! { yyval = concat3(yyvsp[-2], yyvsp[-1], yyvsp[0]); free(yyvsp[-2]); free(yyvsp[-1]); free(yyvsp[0]); ;
- break;}
- case 38:
- ! #line 92 "asm.y"
- ! { yyval = concat("-", yyvsp[0]); free(yyvsp[0]); ;
- break;}
- case 39:
- ! #line 94 "asm.y"
- ! {yyval = wordlookup(yyvsp[0]); free(yyvsp[0]); ;
- break;}
- case 40:
- ! #line 95 "asm.y"
- ! {yyval = hexop(yyvsp[0]); free(yyvsp[0]);;
- ! break;}
- ! case 41:
- ! #line 98 "asm.y"
- ! { yyval = strdup("+"); ;
- ! break;}
- ! case 42:
- ! #line 99 "asm.y"
- ! { yyval = strdup("-"); ;
- ! break;}
- ! case 43:
- ! #line 100 "asm.y"
- ! { yyval = strdup("*"); ;
- ! break;}
- ! case 44:
- ! #line 101 "asm.y"
- { yyval = strdup("/"); ;
- break;}
- }
- ***************
- *** 1000,1006 ****
- yystate = yyn;
- goto yynewstate;
- }
- ! #line 91 "asm.y"
-
- #include <setjmp.h>
-
- --- 1035,1041 ----
- yystate = yyn;
- goto yynewstate;
- }
- ! #line 103 "asm.y"
-
- #include <setjmp.h>
-
- ***************
- *** 1039,1045 ****
- jmp_buf save;
- FILE *oldin, *f;
-
- ! f = fopen(file, "r");
- if (!f) {
- perror(file);
- return;
- --- 1074,1080 ----
- jmp_buf save;
- FILE *oldin, *f;
-
- ! f = fopen(file, "rt");
- if (!f) {
- perror(file);
- return;
- ***************
- *** 1099,1105 ****
- fprintf(stderr, "missing argument to -o\n");
- usage();
- }
- ! f = fopen(*argv, "w");
- if (!f)
- perror(*argv);
- else
- --- 1134,1140 ----
- fprintf(stderr, "missing argument to -o\n");
- usage();
- }
- ! f = fopen(*argv, "wt");
- if (!f)
- perror(*argv);
- else
- ***************
- *** 1145,1151 ****
- yyparse();
- } else {
- while(*argv) {
- ! if (!(f = fopen(*argv, "r")))
- perror(*argv);
- else {
- infile = f;
- --- 1180,1186 ----
- yyparse();
- } else {
- while(*argv) {
- ! if (!(f = fopen(*argv, "rt")))
- perror(*argv);
- else {
- infile = f;
- *** 1.4 1993/03/08 21:36:20
- --- asmtrans.h 1993/05/25 16:40:12
- ***************
- *** 36,41 ****
- --- 36,43 ----
- char *concat4 P_((char *, char *, char *, char *));
- char *concat5 P_((char *,char *, char *, char *, char *));
- char *concat6 P_((char *,char *,char *, char *, char *, char *));
- + char *concat8 P_((char *,char *,char *, char *, char *, char *, char *, char *));
- + char *concat9 P_((char *,char *,char *, char *, char *, char *, char *, char *, char *));
- void do_define P_((char *, char *));
- void do_ifdef P_((char *));
- void do_ifndef P_((char *));
- ***************
- *** 47,52 ****
- --- 49,55 ----
-
- char *wordlookup P_((char *));
- char *changesiz P_((char *));
- + char *changesiz2 P_((char *));
- char *fixupword P_((char *));
- void emit P_((char *));
-
- ***************
- *** 57,63 ****
- char *indexed P_((char *, char *));
- char *sizedop P_((char *, char *));
- char *twoindex P_((char *, char *, char *));
- ! char *bitfield P_((char *, char *, char *));
- char *do_ops P_((char *, char *, char *, char *));
- char *hexop P_((char *));
-
- --- 60,70 ----
- char *indexed P_((char *, char *));
- char *sizedop P_((char *, char *));
- char *twoindex P_((char *, char *, char *));
- ! char *postindex P_((char *, char *, char *, char *));
- ! char *postindex0 P_((char *));
- ! char *postindex1 P_((char *, char *));
- ! char *preindex P_((char *, char *, char *, char *));
- ! char *bitfield P_((char *, char *, char *));
- char *do_ops P_((char *, char *, char *, char *));
- char *hexop P_((char *));
-
- *** 1.4 1993/03/08 21:36:20
- --- basepage.h 1993/04/15 00:32:00
- ***************
- *** 29,35 ****
- char p_cmdlin[128]; /* command line image */
- } BASEPAGE;
-
- ! #ifdef __TURBOC__
- # include <basepage.h>
- # define _base (BASEPAGE *)(_BasPag)
- #else
- --- 29,35 ----
- char p_cmdlin[128]; /* command line image */
- } BASEPAGE;
-
- ! #if defined(__TURBOC__) && !defined(__MINT__)
- # include <basepage.h>
- # define _base (BASEPAGE *)(_BasPag)
- #else
- *** 1.4 1993/03/08 21:36:20
- --- bios.c 1993/06/23 16:44:08
- ***************
- *** 21,26 ****
- --- 21,27 ----
- /* BIOS device definitions */
- #define CONSDEV 2
- #define AUXDEV 1
- + #define PRNDEV 0
-
- /* BIOS devices 0..MAX_BHANDLE-1 can be redirected to GEMDOS files */
- #define MAX_BHANDLE 4
- ***************
- *** 33,38 ****
- --- 34,40 ----
- extern struct tty con_tty, aux_tty, midi_tty;
-
- extern int tosvers; /* from main.c */
- +
- char *kbshft; /* set in main.c */
-
- /* some BIOS vectors; note that the routines at these vectors may do nasty
- ***************
- *** 43,49 ****
- #define MEDIACH *((long *)0x47eL)
- #define GETBPB *((long *)0x472L)
-
- - #define is_falcon ((mch & 0xffff0000L) == 0x00030000L)
-
- #if 1
- /* these are supposed to be tables holding the addresses of the
- --- 45,50 ----
- ***************
- *** 58,73 ****
- #define xconout ((long *)0x57eL)
-
- #define BCOSTAT(dev) \
- ! ((tosvers >= 0x0102 && (unsigned)dev <= 4) ? \
- (int)callout1(xcostat[dev], dev) : Bcostat(dev))
- #define BCONOUT(dev, c) \
- ! ((tosvers >= 0x0102 && (unsigned)dev <= 4) ? \
- callout2(xconout[dev], dev, c) : Bconout(dev, c))
- #define BCONSTAT(dev) \
- ! ((tosvers >= 0x0102 && (unsigned)dev <= 4) ? \
- (int)callout1(xconstat[dev], dev) : Bconstat(dev))
- #define BCONIN(dev) \
- ! ((tosvers >= 0x0102 && (unsigned)dev <= 4) ? \
- callout1(xconin[dev], dev) : Bconin(dev))
- #else
- #define BCOSTAT(dev) Bcostat(dev)
- --- 59,74 ----
- #define xconout ((long *)0x57eL)
-
- #define BCOSTAT(dev) \
- ! ((tosvers > 0x0102 && (unsigned)dev <= 4) ? \
- (int)callout1(xcostat[dev], dev) : Bcostat(dev))
- #define BCONOUT(dev, c) \
- ! ((tosvers > 0x0102 && (unsigned)dev <= 4) ? \
- callout2(xconout[dev], dev, c) : Bconout(dev, c))
- #define BCONSTAT(dev) \
- ! ((tosvers > 0x0102 && (unsigned)dev <= 4) ? \
- (int)callout1(xconstat[dev], dev) : Bconstat(dev))
- #define BCONIN(dev) \
- ! ((tosvers > 0x0102 && (unsigned)dev <= 4) ? \
- callout1(xconin[dev], dev) : Bconin(dev))
- #else
- #define BCOSTAT(dev) Bcostat(dev)
- ***************
- *** 132,141 ****
- if (dev == AUXDEV && has_bconmap)
- dev = curproc->bconmap;
-
- - /* compensate for a bug in the Falcon BIOS */
- - if (dev == 7 && is_falcon)
- - return Bconstat(1);
- -
- return BCONSTAT(dev);
- }
-
- --- 133,138 ----
- ***************
- *** 184,194 ****
- if (dev == AUXDEV && has_bconmap)
- dev = curproc->bconmap;
-
- - if (dev == 7 && is_falcon) {
- - while (!Bconstat(1))
- - yield();
- - return Bconin(1);
- - }
- if (dev > 0) {
- while (!BCONSTAT(dev)) {
- yield();
- --- 181,186 ----
- ***************
- *** 257,266 ****
- statdev = 4;
- } else if (dev == 4) {
- statdev = 3;
- - } else if (dev == 7 && is_falcon) {
- - /* Falcon BIOS bug */
- - (void)Bconout(1,c);
- - return 1;
- } else {
- statdev = dev;
- }
- --- 249,254 ----
- ***************
- *** 278,285 ****
-
- /* special case: many text accelerators return a bad value from
- * Bconout, so we ignore the returned value for the console
- */
- ! if (dev != CONSDEV) {
- /* NOTE: if your compiler complains about the next line, then Bconout is
- * improperly declared in your osbind.h header file. it should be returning
- * a long value; some libraries incorrectly have Bconout returning void
- --- 266,275 ----
-
- /* special case: many text accelerators return a bad value from
- * Bconout, so we ignore the returned value for the console
- + * Sigh. serptch2 and hsmodem1 also screw this up, so for now let's
- + * only count on it being correct for the printer.
- */
- ! if (dev == PRNDEV) {
- /* NOTE: if your compiler complains about the next line, then Bconout is
- * improperly declared in your osbind.h header file. it should be returning
- * a long value; some libraries incorrectly have Bconout returning void
- ***************
- *** 419,425 ****
- /* we can't trust the Getbpb routine to accurately save all registers,
- * so we do it ourselves
- */
- ! r = callout(GETBPB, dev);
- /*
- * There is a bug in the TOS disk handling routines (well several actually).
- * If the directory size of Getbpb() is returned as zero then the drive 'dies'
- --- 409,415 ----
- /* we can't trust the Getbpb routine to accurately save all registers,
- * so we do it ourselves
- */
- ! r = callout1(GETBPB, dev);
- /*
- * There is a bug in the TOS disk handling routines (well several actually).
- * If the directory size of Getbpb() is returned as zero then the drive 'dies'
- ***************
- *** 478,486 ****
- else if (dev == 3) dev = 4;
- else if (dev == 4) dev = 3;
-
- - /* correct for a bug in the Falcon BIOS */
- - if (dev == 7 && is_falcon)
- - return Bcostat(1);
- return BCOSTAT(dev);
- }
-
- --- 468,473 ----
- ***************
- *** 945,950 ****
- --- 932,939 ----
- unhook(v, where);
- }
- }
- + #else
- + UNUSED(start); UNUSED(end);
- #endif
- }
-
- *** 1.4 1993/03/08 21:36:20
- --- biosfs.c 1993/04/28 18:22:58
- ***************
- *** 1046,1064 ****
- ws->ws_col = *((short *)(aline - 44)) + 1;
- } else if (mode == TIOCIBAUD || mode == TIOCOBAUD) {
- long oldbaud, newbaud;
- dev = f->fc.aux;
-
- newbaud = *r;
- if (dev == 1 || dev >= 6) {
- if (has_bconmap)
- ! mapin((dev == 1) ? curproc->bconmap : dev);
- i = (int)rsconf(-2, -1, -1, -1, -1, -1);
- if (i < 0 || i >= MAXBAUD)
- oldbaud = -1L;
- else
- oldbaud = baudmap[i];
- *r = oldbaud;
- ! if (newbaud > 0) {
- /* BUG: assert DTR works only on modem1 */
- if (dev == 1 || dev == 6) {
- Offgibit(0xef);
- --- 1046,1070 ----
- ws->ws_col = *((short *)(aline - 44)) + 1;
- } else if (mode == TIOCIBAUD || mode == TIOCOBAUD) {
- long oldbaud, newbaud;
- + int oldmap;
- +
- dev = f->fc.aux;
-
- newbaud = *r;
- if (dev == 1 || dev >= 6) {
- + /* trick rsconf into setting the correct port (it uses curproc->bconmap) */
- + oldmap = curproc->bconmap;
- if (has_bconmap)
- ! curproc->bconmap =
- ! (dev == 1) ? curproc->bconmap : dev;
- i = (int)rsconf(-2, -1, -1, -1, -1, -1);
- +
- if (i < 0 || i >= MAXBAUD)
- oldbaud = -1L;
- else
- oldbaud = baudmap[i];
- *r = oldbaud;
- ! if (newbaud > 0 && newbaud != oldbaud) {
- /* BUG: assert DTR works only on modem1 */
- if (dev == 1 || dev == 6) {
- Offgibit(0xef);
- ***************
- *** 1066,1077 ****
- --- 1072,1086 ----
- for (i = 0; i < MAXBAUD; i++) {
- if (baudmap[i] == newbaud) {
- rsconf(i, -1, -1, -1, -1, -1);
- + curproc->bconmap = oldmap;
- return 0;
- } else if (baudmap[i] < newbaud) {
- *r = baudmap[i];
- + curproc->bconmap = oldmap;
- break;
- }
- }
- + curproc->bconmap = oldmap;
- return ERANGE;
- } else if (newbaud == 0L) {
- /* BUG: drop DTR: works only on modem1 */
- ***************
- *** 1079,1084 ****
- --- 1088,1094 ----
- Ongibit(0x10);
- }
- }
- + curproc->bconmap = oldmap;
- return 0;
- } else if (dev == 2 || dev == 5) {
- /* screen: assume 9600 baud */
- *** 1.4 1993/03/08 21:36:20
- --- debug.c 1993/06/10 18:37:04
- ***************
- *** 1,6 ****
- /*
- Copyright 1990,1991,1992 Eric R. Smith.
- ! Copyright 1992 Atari Corporation.
- All rights reserved.
- */
-
- --- 1,6 ----
- /*
- Copyright 1990,1991,1992 Eric R. Smith.
- ! Copyright 1992,1993 Atari Corporation.
- All rights reserved.
- */
-
- ***************
- *** 517,522 ****
- --- 517,531 ----
- }
-
-
- + static char *rebootmsg[MAXLANG] = {
- + "FATAL ERROR. You must reboot the system.\r\n",
- + "FATAL ERROR. You must reboot the system.\r\n", /* German */
- + "FATAL ERROR. You must reboot the system.\r\n", /* French */
- + "FATAL ERROR. You must reboot the system.\r\n", /* UK */
- + "FATAL ERROR. You must reboot the system.\r\n", /* Spanish */
- + "FATAL ERROR. You must reboot the system.\r\n" /* Italian */
- + };
- +
- EXITING
- void HALT()
- {
- ***************
- *** 528,534 ****
- --- 537,547 ----
- extern EXITING _exit P_((int));
- #endif
- restr_intr(); /* restore interrupts to normal */
- + #ifdef DEBUG_INFO
- debug_ws("Fatal MiNT error: adjust debug level and hit a key...\r\n");
- + #else
- + debug_ws(rebootmsg[gl_lang]);
- + #endif
- sys_q[READY_Q] = 0; /* prevent context switches */
-
- for(;;) {
- ***************
- *** 543,553 ****
- }
- }
- for(;;) {
- ! debug_ws("System halted. Press 'x' to exit, or else reboot\r\n");
- r = Bconin(2);
-
- if ( (r & 0x0ff) == 'x' ) {
- close_filesys();
- (void)Super((void *)tosssp); /* gratuitous (void *) for Lattice */
- #ifdef PROFILING
- _exit(0);
- --- 556,569 ----
- }
- }
- for(;;) {
- ! debug_ws(rebootmsg[gl_lang]);
- r = Bconin(2);
-
- if ( (r & 0x0ff) == 'x' ) {
- + extern int no_mem_prot;
- close_filesys();
- + if (!no_mem_prot)
- + restr_mmu();
- (void)Super((void *)tosssp); /* gratuitous (void *) for Lattice */
- #ifdef PROFILING
- _exit(0);
- ***************
- *** 577,583 ****
- case UNDO:
- killgroup(con_tty.pgrp, SIGQUIT);
- break;
- ! #ifndef NO_DEBUG_INFO
- case 0x3b: /* F1: increase debugging level */
- debug_level++;
- break;
- --- 593,599 ----
- case UNDO:
- killgroup(con_tty.pgrp, SIGQUIT);
- break;
- ! #ifdef DEBUG_INFO
- case 0x3b: /* F1: increase debugging level */
- debug_level++;
- break;
- *** 1.4 1993/03/08 21:36:20
- --- dos.c 1993/04/15 00:33:24
- ***************
- *** 69,75 ****
- long ARGS_ON_STACK t_setdate(date)
- int date;
- {
- ! long r = Tsetdate(date);
- datestamp = Tgetdate();
- return r;
- }
- --- 69,80 ----
- long ARGS_ON_STACK t_setdate(date)
- int date;
- {
- ! long r;
- !
- ! /* Only the superuser may set date or time */
- ! if (curproc->euid != 0)
- ! return EACCDN;
- ! r = Tsetdate(date);
- datestamp = Tgetdate();
- return r;
- }
- ***************
- *** 77,83 ****
- long ARGS_ON_STACK t_settime(time)
- int time;
- {
- ! long r = Tsettime(time);
- timestamp = Tgettime();
- return r;
- }
- --- 82,92 ----
- long ARGS_ON_STACK t_settime(time)
- int time;
- {
- ! long r;
- !
- ! if (curproc->euid != 0)
- ! return EACCDN;
- ! r = Tsettime(time);
- timestamp = Tgettime();
- return r;
- }
- *** 1.4 1993/03/08 21:36:20
- --- dosfile.c 1993/04/28 18:06:22
- ***************
- *** 1,6 ****
- /*
- Copyright 1990,1991,1992 Eric R. Smith.
- ! Copyright 1992 Atari Corporation.
- All rights reserved.
- */
-
- --- 1,6 ----
- /*
- Copyright 1990,1991,1992 Eric R. Smith.
- ! Copyright 1992,1993 Atari Corporation.
- All rights reserved.
- */
-
- ***************
- *** 414,419 ****
- --- 414,420 ----
- f = do_open("u:\\dev\\null", O_RDWR|O_CREAT|O_TRUNC, 0,
- (XATTR *)0);
- proc->handle[i] = f;
- + proc->fdflags[i] = FD_CLOEXEC;
- return i+offset;
- }
- if (attrib & (FA_LABEL|FA_DIR)) {
- ***************
- *** 428,433 ****
- --- 429,435 ----
- return mint_errno;
- }
- proc->handle[i] = f;
- + proc->fdflags[i] = FD_CLOEXEC;
- i += offset;
- TRACE(("Fcreate: returning %d", i));
- return i;
- ***************
- *** 468,474 ****
- } else
- f = 0;
-
- ! if (f) f->links++;
- proc->handle[fh] = f;
- return r;
- }
- --- 470,479 ----
- } else
- f = 0;
-
- ! if (f) {
- ! f->links++;
- ! proc->fdflags[fh] = 0;
- ! }
- proc->handle[fh] = f;
- return r;
- }
- ***************
- *** 668,673 ****
- --- 673,681 ----
-
- (void)do_close(curproc->handle[newh]);
- curproc->handle[newh] = f;
- + /* set default file descriptor flags */
- + if (newh >= 0)
- + curproc->fdflags[newh] = (newh >= MIN_OPEN) ? FD_CLOEXEC : 0;
- f->links++;
- /*
- * special: for a tty, if this is becoming a control terminal and the
- ***************
- *** 680,686 ****
- if (!tty->pgrp)
- tty->pgrp = curproc->pgrp;
- }
- ! return newh;
- }
-
- long ARGS_ON_STACK
- --- 688,694 ----
- if (!tty->pgrp)
- tty->pgrp = curproc->pgrp;
- }
- ! return 0;
- }
-
- long ARGS_ON_STACK
- ***************
- *** 978,984 ****
- mask = 1L;
- for (i = 0; i < MAX_OPEN; i++) {
- if ( ((rfd & mask) || (wfd & mask)) && !(p->handle[i]) ) {
- ! DEBUG(("Fselect: invalid handle"));
- return EIHNDL;
- }
- mask = mask << 1L;
- --- 986,992 ----
- mask = 1L;
- for (i = 0; i < MAX_OPEN; i++) {
- if ( ((rfd & mask) || (wfd & mask)) && !(p->handle[i]) ) {
- ! DEBUG(("Fselect: invalid handle: %d", i));
- return EIHNDL;
- }
- mask = mask << 1L;
- *** 1.4 1993/03/08 21:36:20
- --- dosmem.c 1993/06/22 16:54:58
- ***************
- *** 1,6 ****
- /*
- Copyright 1990,1991,1992 Eric R. Smith.
- ! Copyright 1992 Atari Corporation.
- All rights reserved.
- */
-
- --- 1,6 ----
- /*
- Copyright 1990,1991,1992 Eric R. Smith.
- ! Copyright 1992,1993 Atari Corporation.
- All rights reserved.
- */
-
- ***************
- *** 102,108 ****
- {
- long r, r1;
- int protmode;
- ! #ifndef NO_DEBUG_INFO
- int origmode = mode;
- #endif
-
- --- 102,108 ----
- {
- long r, r1;
- int protmode;
- ! #ifdef DEBUG_INFO
- int origmode = mode;
- #endif
-
- ***************
- *** 337,342 ****
- --- 337,343 ----
- /* fall through */
- case 4:
- mkwait = mkgo = 1;
- + thread = (mode == 4);
- tfmt = "Pexec(%d,%lx,BP:%lx,%lx)";
- tail_offs = 0;
- break;
- ***************
- *** 439,447 ****
- --- 440,462 ----
- else
- env = 0;
- if (!env) {
- + DEBUG(("Pexec: memory not owned by parent"));
- if (p) dispose_proc(p);
- return EIMBA;
- }
- + #if 0
- + /* make sure that the PC we are about to use is in a region which is
- + * attached to the process; this is most commonly a problem for
- + * shared text segment programs.
- + * BUG: we should verify that the PC is in a region to which the
- + * child process should legitimately have access.
- + */
- + text = addr2region(((BASEPAGE *)base->loc)->p_tbase);
- + if (text == base) {
- + /* text segment is part of base region */
- + text = NULL;
- + }
- + #endif
- }
-
- /* make a local copy of the name, in case we are overlaying the current
- *** 1.4 1993/03/08 21:36:20
- --- fasttext.c 1993/04/15 00:34:06
- ***************
- *** 1,6 ****
- /*
- ! Copyright 1992,1992 Eric R. Smith.
- ! Copyright 1992 Atari Corporation.
- All rights reserved.
- */
-
- --- 1,6 ----
- /*
- ! Copyright 1991,1992 Eric R. Smith.
- ! Copyright 1992,1993 Atari Corporation.
- All rights reserved.
- */
-
- ***************
- *** 64,69 ****
- --- 64,70 ----
- INLINE static void insert_line P_((SCREEN *, int));
- static void setbgcol P_((SCREEN *, int));
- static void setfgcol P_((SCREEN *, int));
- + static void setcurs P_((SCREEN *, int));
- static void putesc P_((SCREEN *, int));
- static void escy1_putch P_((SCREEN *, int));
- INLINE static void put_ch P_((SCREEN *, int));
- ***************
- *** 889,894 ****
- --- 890,910 ----
- }
-
- static void
- + setcurs(v, c)
- + SCREEN *v;
- + int c;
- + {
- + c -= ' ';
- + if (!c) {
- + v->flags &= ~CURS_FLASH;
- + } else {
- + v->flags |= CURS_FLASH;
- + v->period = (unsigned char) c;
- + }
- + state = normal_putch;
- + }
- +
- + static void
- quote_putch(v, c)
- SCREEN *v;
- int c;
- ***************
- *** 974,980 ****
- v->cursaddr = base + *(long *)(rowoff + i);
- delete_line(v, cy);
- break;
- ! case 'Q': /* quote-next-char */
- state = quote_putch;
- return;
- case 'Y':
- --- 990,996 ----
- v->cursaddr = base + *(long *)(rowoff + i);
- delete_line(v, cy);
- break;
- ! case 'Q': /* EXTENSION: quote-next-char */
- state = quote_putch;
- return;
- case 'Y':
- ***************
- *** 1021,1026 ****
- --- 1037,1045 ----
- case 'q': /* reverse video off */
- v->flags &= ~FINVERSE;
- break;
- + case 't': /* EXTENSION: set cursor flash rate */
- + state = setcurs;
- + return;
- case 'v': /* wrap on */
- v->flags |= FWRAP;
- break;
- ***************
- *** 1101,1107 ****
- return;
- case '\t':
- if (v->cx < v->maxx) {
- ! register union {
- long l;
- short i[2];
- } j;
- --- 1120,1127 ----
- return;
- case '\t':
- if (v->cx < v->maxx) {
- ! /* this can't be register for an ANSI compiler */
- ! union {
- long l;
- short i[2];
- } j;
- *** 1.4 1993/03/08 21:36:20
- --- file.h 1993/06/10 20:25:32
- ***************
- *** 1,6 ****
- /*
- Copyright 1991,1992 Eric R. Smith.
- ! Copyright 1992 Atari Corporation.
- All rights reserved.
- */
-
- --- 1,6 ----
- /*
- Copyright 1991,1992 Eric R. Smith.
- ! Copyright 1992,1993 Atari Corporation.
- All rights reserved.
- */
-
- ***************
- *** 9,14 ****
- --- 9,15 ----
-
- struct filesys; /* forward declaration */
- struct devdrv; /* ditto */
- + struct timeout; /* and ditto */
-
- typedef struct f_cookie {
- struct filesys *fs; /* filesystem that knows about this cookie */
- ***************
- *** 237,246 ****
-
- /* file system utility functions */
- int ARGS_ON_STACK (*denyshare) P_((FILEPTR *, FILEPTR *));
-
- /* reserved for future use */
- ! LOCK * ARGS_ON_STACK (*denylock) P_((LOCK *, LOCK *));
- ! long res2[9];
- };
-
- /* flags for open() modes */
- --- 238,251 ----
-
- /* file system utility functions */
- int ARGS_ON_STACK (*denyshare) P_((FILEPTR *, FILEPTR *));
- + LOCK * ARGS_ON_STACK (*denylock) P_((LOCK *, LOCK *));
-
- + /* functions for adding/cancelling timeouts */
- + struct timeout * ARGS_ON_STACK (*addtimeout) P_((long, void (*)()));
- + void ARGS_ON_STACK (*canceltimeout) P_((struct timeout *));
- +
- /* reserved for future use */
- ! long res2[7];
- };
-
- /* flags for open() modes */
- *** 1.4 1993/03/08 21:36:20
- --- filesys.c 1993/06/17 22:56:00
- ***************
- *** 1,6 ****
- /*
- Copyright 1990,1991,1992 Eric R. Smith.
- ! Copyright 1992 Atari Corp.
- All rights reserved.
- */
-
- --- 1,6 ----
- /*
- Copyright 1990,1991,1992 Eric R. Smith.
- ! Copyright 1992,1993 Atari Corp.
- All rights reserved.
- */
-
- ***************
- *** 188,193 ****
- --- 188,194 ----
- }
- }
-
- + #if 0
- /* here, we invalidate all old drives EXCEPT for ones we're already using (at
- * this point, only the bios devices should be open)
- * this gives newly loaded file systems a chance to replace the
- ***************
- *** 197,202 ****
- --- 198,204 ----
- if (d_lock(1, i) == 0) /* lock if possible */
- d_lock(0, i); /* and then unlock */
- }
- + #endif
- }
-
- void
- ***************
- *** 333,339 ****
- * check for media change: if the drive has changed, call changedrv to
- * invalidate any open files and file handles associated with it, and
- * call the file system's media change routine.
- ! * returns: 0 if no change, 1 if change
- */
-
- int
- --- 335,341 ----
- * check for media change: if the drive has changed, call changedrv to
- * invalidate any open files and file handles associated with it, and
- * call the file system's media change routine.
- ! * returns: 0 if no change, 1 if change, negative number for error
- */
-
- int
- ***************
- *** 369,379 ****
- * PROBLEM: AHDI may get upset if the drive isn't valid.
- * SOLUTION: don't change the default PSEUDODRIVES setting!
- */
- ! r = mediach(d);
- if (r == 1) { /* drive _may_ have changed */
- r = rwabs(0, tmpbuf, 1, 0, d, 0L); /* check the BIOS */
- if (r != E_CHNG) { /* nope, no change */
- ! return 0;
- }
- r = 2; /* drive was definitely changed */
- }
- --- 371,386 ----
- * PROBLEM: AHDI may get upset if the drive isn't valid.
- * SOLUTION: don't change the default PSEUDODRIVES setting!
- */
- !
- ! TRACE(("calling mediach(%d)",d));
- ! r = (int)mediach(d);
- ! TRACE(("mediach(%d) == %ld", d, r));
- !
- ! if (r < 0) return r;
- if (r == 1) { /* drive _may_ have changed */
- r = rwabs(0, tmpbuf, 1, 0, d, 0L); /* check the BIOS */
- if (r != E_CHNG) { /* nope, no change */
- ! return (r < 0) ? r : 0;
- }
- r = 2; /* drive was definitely changed */
- }
- ***************
- *** 520,529 ****
- * path2cookie will restart the search automatically; other functions
- * that call relpath2cookie directly will have to fail gracefully
- */
- ! if (disk_changed(dir.dev)) {
- release_cookie(&dir);
- ! PATH2COOKIE_DB(("relpath2cookie: returning %d", E_CHNG));
- ! return E_CHNG;
- }
-
-
- --- 527,537 ----
- * path2cookie will restart the search automatically; other functions
- * that call relpath2cookie directly will have to fail gracefully
- */
- ! if ((r = disk_changed(dir.dev)) != 0) {
- release_cookie(&dir);
- ! if (r > 0) r = E_CHNG;
- ! PATH2COOKIE_DB(("relpath2cookie: returning %d", r));
- ! return r;
- }
-
-
- *** 1.4 1993/03/08 21:36:20
- --- inline.h 1993/04/15 00:34:40
- ***************
- *** 1,5 ****
- --- 1,6 ----
- /*
- Copyright 1992 Eric R. Smith.
- + Copyright 1993 Atari Corporation.
- All rights reserved.
- */
-
- ***************
- *** 76,81 ****
- --- 77,83 ----
- retvalue; \
- })
-
- + #define flush_pmmu() __asm__ volatile("pflusha");
- #endif
-
- #ifdef LATTICE
- *** 1.4 1993/03/08 21:36:20
- --- main.c 1993/06/16 17:29:22
- ***************
- *** 67,73 ****
- }
- #endif
-
- ! #ifdef __GNUC__
- long _stksize = STACK;
- #ifndef PROFILING
- #include <minimal.h>
- --- 67,73 ----
- }
- #endif
-
- ! #if defined(__GNUC__) || defined(__MINT__)
- long _stksize = STACK;
- #ifndef PROFILING
- #include <minimal.h>
- ***************
- *** 121,129 ****
-
- /* program to run at startup */
- #ifdef MULTITOS
- ! static int init_is_gemsys = 1; /* set to 1 if init is gem.sys */
- #else
- ! static int init_is_gemsys = 0; /* set to 1 if init is gem.sys */
- #endif
- static const char *init_prg = 0;
-
- --- 121,129 ----
-
- /* program to run at startup */
- #ifdef MULTITOS
- ! static int init_is_gem = 1; /* set to 1 if init_prg is GEM */
- #else
- ! static int init_is_gem = 0; /* set to 1 if init_prg is GEM */
- #endif
- static const char *init_prg = 0;
-
- ***************
- *** 192,198 ****
- strnicmp, stricmp, strlwr, strupr, ksprintf,
- ms_time, unixtim, dostim,
- nap, sleep, wake, wakeselect,
- ! denyshare, denylock
- };
-
- /* table of processor frame sizes in _words_ (not used on MC68000) */
- --- 192,198 ----
- strnicmp, stricmp, strlwr, strupr, ksprintf,
- ms_time, unixtim, dostim,
- nap, sleep, wake, wakeselect,
- ! denyshare, denylock, addtimeout, canceltimeout
- };
-
- /* table of processor frame sizes in _words_ (not used on MC68000) */
- ***************
- *** 274,285 ****
- * bus error right after the Mshrink call!
- */
- setstack(basepage+500L);
- ! #ifdef __TURBOC__
- Mshrink(0, (void *)basepage, 512L);
- #else
- Mshrink((void *)basepage, 512L);
- #endif
- ! r = Pexec(200, init_prg, init_tail, init_env);
- Pterm(r);
- }
-
- --- 274,285 ----
- * bus error right after the Mshrink call!
- */
- setstack(basepage+500L);
- ! #if defined(__TURBOC__) && !defined(__MINT__)
- Mshrink(0, (void *)basepage, 512L);
- #else
- Mshrink((void *)basepage, 512L);
- #endif
- ! r = (int) Pexec(200, (char *)init_prg, init_tail, init_env);
- Pterm(r);
- }
-
- ***************
- *** 549,555 ****
- }
- }
-
- ! #ifdef __GNUC__
- int
- main(argc, argv, envp)
- int argc;
- --- 549,555 ----
- }
- }
-
- ! #if defined(__GNUC__) || defined(__MINT__)
- int
- main(argc, argv, envp)
- int argc;
- ***************
- *** 572,577 ****
- --- 572,581 ----
- long yn;
- FILEPTR *f;
-
- + #if defined(__GNUC__) || defined(__MINT__)
- + UNUSED(envp);
- + #endif
- +
- /* figure out what kind of machine we're running on */
- /* biosfs wants to know this; also sets no_mem_prot */
- /* 920625 kbad put it here so memprot_warning can be intelligent */
- ***************
- *** 700,707 ****
- */
- /* set the current directory for the current process */
- (void)Dgetpath(curpath, 0);
- !
- tosssp = (long)Super(0L); /* enter supervisor mode */
-
- /* get GEMDOS pointer to current basepage */
- /* 0x4f2 points to the base of the OS; here we can find the OS compilation
- --- 704,716 ----
- */
- /* set the current directory for the current process */
- (void)Dgetpath(curpath, 0);
- ! if (!*curpath) {
- ! curpath[0] = '\\';
- ! curpath[1] = 0;
- ! }
- tosssp = (long)Super(0L); /* enter supervisor mode */
- + if (!no_mem_prot)
- + save_mmu(); /* save current MMU setup */
-
- /* get GEMDOS pointer to current basepage */
- /* 0x4f2 points to the base of the OS; here we can find the OS compilation
- ***************
- *** 723,732 ****
- kbshft = (char *) sysbase[9];
- }
-
- /* The TT TOS release notes are wrong... this is the real way to test
- * for Bconmap ability
- */
- ! has_bconmap = (Bconmap(0) == 0);
-
- /* initialize memory */
- init_mem();
- --- 732,744 ----
- kbshft = (char *) sysbase[9];
- }
-
- + if (tosvers >= 0x0400 && tosvers <= 0x404)
- + has_bconmap = 0; /* Falcon BIOS Bconmap is busted */
- + else
- /* The TT TOS release notes are wrong... this is the real way to test
- * for Bconmap ability
- */
- ! has_bconmap = (Bconmap(0) == 0);
-
- /* initialize memory */
- init_mem();
- ***************
- *** 799,807 ****
- }
-
- /* load external file systems */
- ! if (*curpath) {
- ! (void)d_setpath(curpath);
- ! }
-
- #ifndef PROFILING
- /* load_filesys causes media changes :-( */
- --- 811,820 ----
- }
-
- /* load external file systems */
- ! /* set path first to make sure that MiNT's directory matches
- ! * GEMDOS's
- ! */
- ! (void)d_setpath(curpath);
-
- #ifndef PROFILING
- /* load_filesys causes media changes :-( */
- ***************
- *** 811,819 ****
- /* note that load_filesys changed the
- * directory on us!!
- */
- ! if (*curpath) {
- ! (void)d_setpath(curpath);
- ! }
-
- /* load the configuration file */
- load_config();
- --- 824,830 ----
- /* note that load_filesys changed the
- * directory on us!!
- */
- ! (void)d_setpath(curpath);
-
- /* load the configuration file */
- load_config();
- ***************
- *** 831,839 ****
- }
-
- /* if we are MultiTOS, we're running in the AUTO folder, and our INIT is
- ! * called GEM.SYS, take the exec_os() vector
- */
- ! if (!gem_active && init_is_gemsys) {
- xbra_install(&old_execos, EXEC_OS, (long ARGS_ON_STACK (*)())do_exec_os);
- }
-
- --- 842,851 ----
- }
-
- /* if we are MultiTOS, we're running in the AUTO folder, and our INIT is
- ! * in fact GEM, take the exec_os() vector. (We know that INIT is GEM
- ! * if the user told us so by using GEM= instead of INIT=.)
- */
- ! if (!gem_active && init_is_gem) {
- xbra_install(&old_execos, EXEC_OS, (long ARGS_ON_STACK (*)())do_exec_os);
- }
-
- ***************
- *** 844,856 ****
- /* if that program is in fact GEM, we start it via exec_os, otherwise
- * we do it with Pexec.
- * the logic is: if the user specified init_prg, and it is not
- ! * a gem.sys file, then we try to execute it; if it *is* a gem.sys
- ! * file, we try to execute it if gem is already active, otherwise
- * we jump through the exec_os vector (which we grabbed above) in
- * order to start it. We *never* go through exec_os if we're not in
- * the AUTO folder.
- */
- ! if (init_prg && (!init_is_gemsys || gem_active)) {
- r = p_exec(0, (char *)init_prg, init_tail, init_env);
- } else if (!gem_active) {
- BASEPAGE *bp; int pid;
- --- 856,868 ----
- /* if that program is in fact GEM, we start it via exec_os, otherwise
- * we do it with Pexec.
- * the logic is: if the user specified init_prg, and it is not
- ! * GEM, then we try to execute it; if it *is* GEM (e.g. gem.sys),
- ! * then we try to execute it if gem is already active, otherwise
- * we jump through the exec_os vector (which we grabbed above) in
- * order to start it. We *never* go through exec_os if we're not in
- * the AUTO folder.
- */
- ! if (init_prg && (!init_is_gem || gem_active)) {
- r = p_exec(0, (char *)init_prg, init_tail, init_env);
- } else if (!gem_active) {
- BASEPAGE *bp; int pid;
- ***************
- *** 886,897 ****
- shutdown();
-
- /* put everything back and exit */
- ! if (!gem_active && init_is_gemsys) {
- /* we stole exec_os above */
- *((long *)EXEC_OS) = (long)old_execos.next;
- }
- restr_intr();
- close_filesys();
-
- (void)Super((void *)tosssp); /* gratuitous (void *) for Lattice */
- Cconws("leaving MiNT\r\n");
- --- 898,911 ----
- shutdown();
-
- /* put everything back and exit */
- ! if (!gem_active && init_is_gem) {
- /* we stole exec_os above */
- *((long *)EXEC_OS) = (long)old_execos.next;
- }
- restr_intr();
- close_filesys();
- + if (!no_mem_prot)
- + restr_mmu();
-
- (void)Super((void *)tosssp); /* gratuitous (void *) for Lattice */
- Cconws("leaving MiNT\r\n");
- ***************
- *** 974,979 ****
- --- 988,1000 ----
- i++;
- }
-
- + /* jr: install PMMU cookie if memory protection is used */
- + if (!no_mem_prot) {
- + strncpy(newcookie[i].tag.aschar, "PMMU", 4);
- + newcookie[i].value = 0;
- + i++;
- + }
- +
- /* the last cookie should have a 0 tag, and a value indicating the number
- * of slots, total
- */
- ***************
- *** 1026,1031 ****
- --- 1047,1057 ----
- Pterm(2);
- } else if (!strncmp(jar->tag.aschar, "_AKP",4)) {
- gl_lang = (int) ((jar->value >> 8) & 0x00ff);
- + } else if (!strncmp(jar->tag.aschar, "PMMU",4)) {
- + /* jr: if PMMU cookie exists, someone else is
- + already using the PMMU */
- + Cconws ("MiNT: PMMU already in use, memory protection turned off.\r\n");
- + no_mem_prot = 1;
- }
- jar++;
- }
- ***************
- *** 1059,1064 ****
- --- 1085,1093 ----
- }
- }
-
- +
- + if (gl_lang >= MAXLANG || gl_lang < 0)
- + gl_lang = 0;
- return 0L;
- }
-
- ***************
- *** 1068,1074 ****
- * # anything -- comment
- * INIT=file -- specify boot program
- * CON=file -- specify initial file/device for handles -1, 0, 1
- ! * PRN=file -- specify initial file for handle 2
- * BIOSBUF=[yn] -- if 'n' or 'N' then turn off BIOSBUF feature
- * DEBUG_LEVEL=n -- set debug level to (decimal number) n
- * DEBUG_DEVNO=n -- set debug device number to (decimal number) n
- --- 1097,1103 ----
- * # anything -- comment
- * INIT=file -- specify boot program
- * CON=file -- specify initial file/device for handles -1, 0, 1
- ! * PRN=file -- specify initial file for handle 3
- * BIOSBUF=[yn] -- if 'n' or 'N' then turn off BIOSBUF feature
- * DEBUG_LEVEL=n -- set debug level to (decimal number) n
- * DEBUG_DEVNO=n -- set debug device number to (decimal number) n
- ***************
- *** 1096,1106 ****
- char *t;
-
- if (!strcmp(name, "GEM")) {
- ! init_is_gemsys = 1;
- goto setup_init;
- }
- if (!strcmp(name, "INIT")) {
- ! init_is_gemsys = 0;
- setup_init:
- t = kmalloc(strlen(val)+1);
- if (!t) return;
- --- 1125,1135 ----
- char *t;
-
- if (!strcmp(name, "GEM")) {
- ! init_is_gem = 1;
- goto setup_init;
- }
- if (!strcmp(name, "INIT")) {
- ! init_is_gem = 0;
- setup_init:
- t = kmalloc(strlen(val)+1);
- if (!t) return;
- ***************
- *** 1136,1144 ****
-
- f = do_open(val, O_RDWR|O_CREAT|O_TRUNC, 0, (XATTR *)0);
- if (f) {
- ! do_close(curproc->handle[2]);
- do_close(curproc->prn);
- ! curproc->prn = curproc->handle[2] = f;
- f->links = 2;
- }
- return;
- --- 1165,1173 ----
-
- f = do_open(val, O_RDWR|O_CREAT|O_TRUNC, 0, (XATTR *)0);
- if (f) {
- ! do_close(curproc->handle[3]);
- do_close(curproc->prn);
- ! curproc->prn = curproc->handle[3] = f;
- f->links = 2;
- }
- return;
- ***************
- *** 1348,1353 ****
- --- 1377,1385 ----
- }
- FORCE("syntax error in mint.cnf near: %s", cmd);
- }
- +
- + #undef BUF
- + #undef LINE
-
- #define BUF 512
- #define LINE 256
- *** 1.4 1993/03/08 21:36:20
- --- mem.c 1993/04/15 00:35:26
- ***************
- *** 184,194 ****
- }
- }
- if (mxalloc)
- ! return Mxalloc(amt, mode);
- else if (mode == 1)
- return 0L;
- else
- ! return Malloc(amt);
- }
-
- static void
- --- 184,194 ----
- }
- }
- if (mxalloc)
- ! return (long) Mxalloc(amt, mode);
- else if (mode == 1)
- return 0L;
- else
- ! return (long) Malloc(amt);
- }
-
- static void
- ***************
- *** 254,260 ****
- if (temp) {
- (void)Setscreen((void *)-1L,
- (void *)((temp+511)&(0xffffff00L)), -1);
- ! if ((long)Physbase() != (temp+511)&(0xffffff00L)) {
- scrnsize = 0x7fffffffUL;
- scrndone = 1;
- }
- --- 254,260 ----
- if (temp) {
- (void)Setscreen((void *)-1L,
- (void *)((temp+511)&(0xffffff00L)), -1);
- ! if ((long)Physbase() != ((temp+511)&(0xffffff00L))) {
- scrnsize = 0x7fffffffUL;
- scrndone = 1;
- }
- ***************
- *** 1295,1301 ****
-
- r = load_and_reloc(f, fh, (char *)m->loc, 0, fh->ftext, &b);
- if (r) {
- - m->links = 0;
- detach_region(curproc, m);
- kfree(s);
- return 0;
- --- 1295,1300 ----
- ***************
- *** 1615,1621 ****
- DUMPMEM(map)
- MMAP map;
- {
- ! #ifndef NO_DEBUG_INFO
- MEMREGION *m;
-
- m = *map;
- --- 1614,1620 ----
- DUMPMEM(map)
- MMAP map;
- {
- ! #ifdef DEBUG_INFO
- MEMREGION *m;
-
- m = *map;
- ***************
- *** 1626,1631 ****
- --- 1625,1632 ----
- m->links, m->next);
- m = m->next;
- }
- + #else
- + UNUSED(map);
- #endif
- }
-
- *** 1.4 1993/03/08 21:36:20
- --- memprot.c 1993/04/15 00:35:42
- ***************
- *** 91,96 ****
- --- 91,97 ----
- static void _dump_tree P_((long_desc tbl, int level));
-
- extern int debug_level; /* see debug.c */
- + extern long mcpu; /* in main.c */
-
- /*
- * You can turn this whole module off, and the stuff in context.s,
- ***************
- *** 103,116 ****
- /*
- * PMMU stuff
- */
- - #if 1
- - #define flush_pmmu(start, end) __asm("pflusha")
- - #else
- - /* in cpu.spp is a new "cpush" function that can selectively flush
- - * the cache
- - */
- - #define flush_pmmu(start, len) cpush((void *)(start), (long)(len))
- - #endif
-
- /*
- * This is one global TC register that is copied into every process'
- --- 104,109 ----
- ***************
- *** 155,161 ****
- page_type invalid_page;
- page_type page_ptr;
-
- ! page_type *proto_page_type[] =
- { &invalid_page, &g_page, &s_page, &readable_page, &invalid_page };
- /* private global super private/read invalid */
-
- --- 148,154 ----
- page_type invalid_page;
- page_type page_ptr;
-
- ! page_type *const proto_page_type[] =
- { &invalid_page, &g_page, &s_page, &readable_page, &invalid_page };
- /* private global super private/read invalid */
-
- ***************
- *** 297,312 ****
- */
-
- /*
- ! invalid---v
- ! private/gr---v |
- ! super-------v | |
- ! global-------v | | |
- ! private-------v | | | |
- ! | | | | |
- */
- ! ushort other_dt[] = { 0, 1, 1, 1, 0 };
- ! ushort other_s[] = { 0, 0, 1, 0, 0 };
- ! ushort other_wp[] = { 0, 0, 0, 1, 0 };
-
-
- /*
- --- 290,305 ----
- */
-
- /*
- ! invalid---v
- ! private/gr---v |
- ! super-------v | |
- ! global-------v | | |
- ! private-------v | | | |
- ! | | | | |
- */
- ! const ushort other_dt[] = { 0, 1, 1, 1, 0 };
- ! const ushort other_s[] = { 0, 0, 1, 0, 0 };
- ! const ushort other_wp[] = { 0, 0, 0, 1, 0 };
-
-
- /*
- ***************
- *** 464,479 ****
- start += EIGHT_K;
- }
-
- ! #if 0
- ! /*
- ! * Flush the mmu address translation cache only if we changed curproc's
- ! * table.
- */
- !
- ! if (proc == curproc) flush_pmmu(oldstart, oldlen);
- ! #else
- ! flush_pmmu(oldstart, oldlen);
- ! #endif
- }
-
- /* get_prot_mode(r): returns the type of protection region r
- --- 457,472 ----
- start += EIGHT_K;
- }
-
- ! flush_pmmu();
- ! if (mcpu <= 30) {
- ! /* On the '020 & '030 we have a logical cache, i.e. the DC & IC are on
- ! * the CPU side of the MMU, hence on an MMU context switch we must flush
- ! * them too. On the '040, by comparison, we have a physical cache, i.e.
- ! * the DC & IC are on the memory side of the MMU, so no DC/IC cache flush
- ! * is needed.
- */
- ! cpush((void *)oldstart, oldlen);
- ! }
- }
-
- /* get_prot_mode(r): returns the type of protection region r
- ***************
- *** 532,538 ****
- MP_DEBUG(("mark_region: pid %d is an OS special!",proc->pid));
- goto owner;
- }
- ! if (0 != (mr = proc->mem)) {
- for (i = 0; i < proc->num_reg; i++, mr++) {
- if (*mr == region) {
- MP_DEBUG(("mark_region: pid %d is an owner",proc->pid));
- --- 525,531 ----
- MP_DEBUG(("mark_region: pid %d is an OS special!",proc->pid));
- goto owner;
- }
- ! if ((mr = proc->mem) != 0) {
- for (i = 0; i < proc->num_reg; i++, mr++) {
- if (*mr == region) {
- MP_DEBUG(("mark_region: pid %d is an owner",proc->pid));
- ***************
- *** 604,610 ****
- }
- else {
- mark_pages(curproc->page_table,loc,len,
- ! mode&3,mode&4,mode&8,curproc);
- return 0;
- }
- }
- --- 597,603 ----
- }
- else {
- mark_pages(curproc->page_table,loc,len,
- ! mode&3,(mode&4)>>2,(mode&8)>>3,curproc);
- return 0;
- }
- }
- ***************
- *** 866,872 ****
- {
- int i, j;
- long_desc *p;
- ! static char spaces[9] = " ";
-
- /* print the level and display the table descriptor */
- FORCE("\r%s s:%x wp:%x dt:%x a:%08lx",
- --- 859,865 ----
- {
- int i, j;
- long_desc *p;
- ! static const char spaces[9] = " ";
-
- /* print the level and display the table descriptor */
- FORCE("\r%s s:%x wp:%x dt:%x a:%08lx",
- ***************
- *** 901,907 ****
- }
- }
-
- ! static char modesym[] = { 'p', 'g', 's', 'r', 'i' };
-
- void
- QUICKDUMP()
- --- 894,900 ----
- }
- }
-
- ! static const char modesym[] = { 'p', 'g', 's', 'r', 'i' };
-
- void
- QUICKDUMP()
- ***************
- *** 1032,1038 ****
- int bigone;
- PROC *proc;
- {
- ! #ifndef NO_DEBUG_INFO
- char linebuf[128];
- char *lp = linebuf;
- MEMREGION *mp, **mr, **map;
- --- 1025,1031 ----
- int bigone;
- PROC *proc;
- {
- ! #ifdef DEBUG_INFO
- char linebuf[128];
- char *lp = linebuf;
- MEMREGION *mp, **mr, **map;
- ***************
- *** 1096,1102 ****
- tbl.tbl_address = proc->ctxt[CURRENT].crp.tbl_address;
- _dump_tree(tbl,0);
- }
- ! #endif /* NO_DEBUG_INFO */
- }
-
-
- --- 1089,1095 ----
- tbl.tbl_address = proc->ctxt[CURRENT].crp.tbl_address;
- _dump_tree(tbl,0);
- }
- ! #endif /* DEBUG_INFO */
- }
-
-
- *** 1.4 1993/03/08 21:36:20
- --- mint.h 1993/06/10 18:34:40
- ***************
- *** 1,6 ****
- /*
- Copyright 1990,1991,1992 Eric R. Smith.
- ! Copyright 1992 Atari Corporation.
- All rights reserved.
- */
-
- --- 1,6 ----
- /*
- Copyright 1990,1991,1992 Eric R. Smith.
- ! Copyright 1992,1993 Atari Corporation.
- All rights reserved.
- */
-
- ***************
- *** 174,184 ****
- #endif
-
- /* is debugging info included? */
- ! #ifdef MULTITOS
- ! #define NO_DEBUG_INFO
- #endif
-
- ! #ifdef NO_DEBUG_INFO
- #define TRACELOW(x)
- #define TRACE(x)
- #define DEBUG(x)
- --- 174,184 ----
- #endif
-
- /* is debugging info included? */
- ! #ifndef MULTITOS
- ! #define DEBUG_INFO
- #endif
-
- ! #ifndef DEBUG_INFO
- #define TRACELOW(x)
- #define TRACE(x)
- #define DEBUG(x)
- ***************
- *** 220,225 ****
- --- 220,228 ----
-
- extern int has_bconmap; /* set in main() */
- extern int curbconmap; /* see xbios.c */
- +
- + #define MAXLANG 6 /* languages supported */
- + extern int gl_lang; /* set in main.c */
-
- /*
- * load some inline functions, perhaps
- *** 1.4 1993/03/08 21:36:20
- --- proc.c 1993/05/24 23:13:42
- ***************
- *** 534,543 ****
- --- 534,545 ----
- /*
- * restore per-process variables here
- */
- + #ifndef MULTITOS
- #ifdef FASTTEXT
- if (!hardscroll)
- #endif
- *((void **)0x44eL) = curproc->logbase;
- + #endif
- do_wakeup_things();
- return;
- }
- ***************
- *** 544,553 ****
- --- 546,557 ----
- /*
- * save per-process variables here
- */
- + #ifndef MULTITOS
- #ifdef FASTTEXT
- if (!hardscroll)
- #endif
- curproc->logbase = *((void **)0x44eL);
- + #endif
- curproc->ctxt[CURRENT].regs[0] = 1;
- curproc = p;
- proc_clock = TIME_SLICE; /* fresh time */
- ***************
- *** 622,628 ****
- * at all, so I consider all that stack info wasted space. -- AKP
- */
-
- ! #ifndef NO_DEBUG_INFO
- static const char *qstring[] = {
- "run", "ready", "wait", "iowait", "zombie", "tsr", "stop", "select"
- };
- --- 626,632 ----
- * at all, so I consider all that stack info wasted space. -- AKP
- */
-
- ! #ifdef DEBUG_INFO
- static const char *qstring[] = {
- "run", "ready", "wait", "iowait", "zombie", "tsr", "stop", "select"
- };
- ***************
- *** 634,640 ****
- void
- DUMPPROC()
- {
- ! #ifndef NO_DEBUG_INFO
- PROC *p = curproc;
-
- for (curproc = proclist; curproc; curproc = curproc->gl_next) {
- --- 638,644 ----
- void
- DUMPPROC()
- {
- ! #ifdef DEBUG_INFO
- PROC *p = curproc;
-
- for (curproc = proclist; curproc; curproc = curproc->gl_next) {
- *** 1.4 1993/03/08 21:36:20
- --- proc.h 1993/06/10 20:23:36
- ***************
- *** 1,6 ****
- /*
- Copyright 1990,1991,1992 Eric R. Smith.
- ! Copyright 1992 Atari Corporation.
- All rights reserved.
- */
-
- --- 1,6 ----
- /*
- Copyright 1990,1991,1992 Eric R. Smith.
- ! Copyright 1992,1993 Atari Corporation.
- All rights reserved.
- */
-
- *** 1.4 1993/03/08 21:36:20
- --- procfs.c 1993/04/15 00:36:32
- ***************
- *** 1,6 ****
- /*
- Copyright 1991,1992 Eric R. Smith.
- ! Copyright 1992 Atari Corporation.
- All rights reserved.
- */
-
- --- 1,6 ----
- /*
- Copyright 1991,1992 Eric R. Smith.
- ! Copyright 1992,1993 Atari Corporation.
- All rights reserved.
- */
-
- ***************
- *** 252,257 ****
- --- 252,265 ----
- if (!p)
- return EFILNF;
-
- + /* this check is necessary because the Fdelete code checks for
- + * write permission on the directory, not on individual
- + * files
- + */
- + if (curproc->euid && curproc->ruid != p->ruid) {
- + DEBUG(("proc_remove: wrong user"));
- + return EACCDN;
- + }
- post_sig(p, SIGTERM);
- check_sigs(); /* it might have been us */
- return 0;
- ***************
- *** 386,392 ****
- case DP_PATHMAX:
- return PATH_MAX; /* max. path length */
- case DP_NAMEMAX:
- ! return PNAMSIZ; /* max. length of individual name */
- case DP_ATOMIC:
- return UNLIMITED; /* all writes are atomic */
- case DP_TRUNC:
- --- 394,401 ----
- case DP_PATHMAX:
- return PATH_MAX; /* max. path length */
- case DP_NAMEMAX:
- ! return PNAMSIZ + 4; /* max. length of individual name */
- ! /* the "+4" is for the pid: ".123" */
- case DP_ATOMIC:
- return UNLIMITED; /* all writes are atomic */
- case DP_TRUNC:
- ***************
- *** 579,586 ****
- p->ptracer = 0;
- p->ctxt[CURRENT].ptrace = 0;
- p->ctxt[SYSCALL].ptrace = 0;
- ! }
- ! else if (p == curproc) {
- p->ptracer = pid2proc(p->ppid);
- } else {
- p->ptracer = curproc;
- --- 588,599 ----
- p->ptracer = 0;
- p->ctxt[CURRENT].ptrace = 0;
- p->ctxt[SYSCALL].ptrace = 0;
- ! /* if the process is stopped, restart it */
- ! if (p->wait_q == STOP_Q) {
- ! p->sigpending &= ~STOPSIGS;
- ! post_sig(p, SIGCONT);
- ! }
- ! } else if (p == curproc) {
- p->ptracer = pid2proc(p->ppid);
- } else {
- p->ptracer = curproc;
- *** 1.4 1993/03/08 21:36:20
- --- proto.h 1993/06/10 18:04:02
- ***************
- *** 192,198 ****
- void restr_intr P_((void));
- void ARGS_ON_STACK enter_kernel P_((void));
- void ARGS_ON_STACK leave_kernel P_((void));
- ! #ifdef __GNUC__
- int main P_((int argc, char **argv, char **envp));
- #else
- int main P_((int argc, char **argv));
- --- 192,198 ----
- void restr_intr P_((void));
- void ARGS_ON_STACK enter_kernel P_((void));
- void ARGS_ON_STACK leave_kernel P_((void));
- ! #if defined(__GNUC__) || defined (__MINT__)
- int main P_((int argc, char **argv, char **envp));
- #else
- int main P_((int argc, char **argv));
- ***************
- *** 269,277 ****
- void haltcpv P_((void));
-
- /* timeout.c */
- ! TIMEOUT *addtimeout P_((long delta, void (*func)(PROC *p)));
- ! void cancelalltimeouts P_((void));
- ! void canceltimeout P_((TIMEOUT *which));
- void ARGS_ON_STACK timeout P_((void));
- void checkalarms P_((void));
- void ARGS_ON_STACK nap P_((unsigned n));
- --- 269,277 ----
- void haltcpv P_((void));
-
- /* timeout.c */
- ! TIMEOUT * ARGS_ON_STACK addtimeout P_((long delta, void (*func)(PROC *p)));
- ! void ARGS_ON_STACK cancelalltimeouts P_((void));
- ! void ARGS_ON_STACK canceltimeout P_((TIMEOUT *which));
- void ARGS_ON_STACK timeout P_((void));
- void checkalarms P_((void));
- void ARGS_ON_STACK nap P_((unsigned n));
- *** 1.4 1993/03/08 21:36:20
- --- rendez.c 1993/04/15 00:37:02
- ***************
- *** 406,414 ****
- return EACCDN;
- }
- else {
- ! if (mode == 3) s->owner = -1; /* make it free, or */
- ! else *q = s->next; /* delete from list */
- !
- /* wake up anybody who's waiting for a semaphore */
- wake(WAIT_Q,WAIT_SEMA);
- return E_OK;
- --- 406,417 ----
- return EACCDN;
- }
- else {
- ! if (mode == 3) {
- ! s->owner = -1; /* make it free, or */
- ! } else {
- ! *q = s->next; /* delete from list */
- ! kfree(s); /* and free it */
- ! }
- /* wake up anybody who's waiting for a semaphore */
- wake(WAIT_Q,WAIT_SEMA);
- return E_OK;
- *** 1.4 1993/03/08 21:36:20
- --- signal.c 1993/05/25 17:03:00
- ***************
- *** 1,6 ****
- /*
- Copyright 1990,1991,1992 Eric R. Smith.
- ! Copyright 1992 Atari Corporation.
- All rights reserved.
- */
-
- --- 1,6 ----
- /*
- Copyright 1990,1991,1992 Eric R. Smith.
- ! Copyright 1992,1993 Atari Corporation.
- All rights reserved.
- */
-
- ***************
- *** 76,81 ****
- --- 76,85 ----
- p->sigpending |= sigm;
-
- /* if the signal is masked, do nothing further */
- + /* note: some signals can't be masked, and we handle those elsewhere so
- + * that p->sigmask is always valid. SIGCONT is among the unmaskable
- + * signals
- + */
- if ( (p->sigmask & sigm) != 0 )
- return;
-
- ***************
- *** 116,122 ****
- for (i = 1; i < NSIG; i++) {
- if (sigs & sigm) {
- curproc->sigpending &= ~sigm;
- ! if (curproc->ptracer && !deliversig) {
- TRACE(("tracer being notified of signal %d", i));
- stop(i);
- /* the parent may reset our pending signals, so check again */
- --- 120,127 ----
- for (i = 1; i < NSIG; i++) {
- if (sigs & sigm) {
- curproc->sigpending &= ~sigm;
- ! if (curproc->ptracer && !deliversig &&
- ! i != SIGCONT) {
- TRACE(("tracer being notified of signal %d", i));
- stop(i);
- /* the parent may reset our pending signals, so check again */
- ***************
- *** 252,258 ****
- {
- long oldstack, newstack;
- long *stack;
- ! CONTEXT *call, oldsysctxt, newcurrent;
- extern void sig_return();
-
- if (curproc->sighandle[sig] == SIG_IGN)
- --- 257,266 ----
- {
- long oldstack, newstack;
- long *stack;
- ! CONTEXT *call, contexts[2];
- ! #define oldsysctxt (contexts[0])
- ! #define newcurrent (contexts[1])
- !
- extern void sig_return();
-
- if (curproc->sighandle[sig] == SIG_IGN)
- ***************
- *** 351,357 ****
-
- /* set a new system stack, with a bit of buffer space */
- oldstack = curproc->sysstack;
- ! newstack = ((long) ( (&newcurrent) - 3 )) - 12;
-
- if (newstack < (long)curproc->stack + ISTKSIZE + 256) {
- ALERT("stack overflow");
- --- 359,365 ----
-
- /* set a new system stack, with a bit of buffer space */
- oldstack = curproc->sysstack;
- ! newstack = ((long) ( (&newcurrent) - 2 )) - 12;
-
- if (newstack < (long)curproc->stack + ISTKSIZE + 256) {
- ALERT("stack overflow");
- ***************
- *** 427,432 ****
- --- 435,442 ----
- curproc->ctxt[SYSCALL] = oldsysctxt;
- assert(curproc->magic == CTXT_MAGIC);
- }
- + #undef oldsysctxt
- + #undef newcurrent
- }
-
- /*
- ***************
- *** 476,482 ****
- }
- else {
- valid_return = 0;
- ! oldctxt = ((CONTEXT *)(&frame[2])) + 3;
- if (oldctxt->regs[0] != CTXT_MAGIC) {
- FATAL("p_sigreturn: corrupted context");
- }
- --- 486,492 ----
- }
- else {
- valid_return = 0;
- ! oldctxt = ((CONTEXT *)(&frame[2])) + 2;
- if (oldctxt->regs[0] != CTXT_MAGIC) {
- FATAL("p_sigreturn: corrupted context");
- }
- ***************
- *** 552,558 ****
- void
- sigbus()
- {
- ! report_buserr();
- exception(SIGBUS);
- }
-
- --- 562,569 ----
- void
- sigbus()
- {
- ! if (curproc->sighandle[SIGBUS] == SIG_DFL)
- ! report_buserr();
- exception(SIGBUS);
- }
-
- *** 1.4 1993/03/08 21:36:20
- --- sproto.h 1993/04/15 00:37:28
- ***************
- *** 3,9 ****
- */
-
- /* context.s */
- - void ARGS_ON_STACK set_mmu P_((crp_reg, tc_reg));
- long ARGS_ON_STACK build_context P_((CONTEXT *sav, int fmt));
- long ARGS_ON_STACK save_context P_((CONTEXT *sav));
- void ARGS_ON_STACK restore_context P_((CONTEXT *sav));
- --- 3,8 ----
- ***************
- *** 10,17 ****
- --- 9,20 ----
- void ARGS_ON_STACK change_context P_((CONTEXT *sav));
-
- /* cpu.s */
- + void ARGS_ON_STACK set_mmu P_((crp_reg, tc_reg));
- + void ARGS_ON_STACK save_mmu P_((void));
- + void ARGS_ON_STACK restr_mmu P_((void));
- void ARGS_ON_STACK cpush P_((const void *base, long size));
- void ARGS_ON_STACK setstack P_((long));
- + void ARGS_ON_STACK flush_pmmu P_((void));
-
- /* intr.s */
- void ARGS_ON_STACK reboot P_((void));
- *** 1.4 1993/03/08 21:36:20
- --- timeout.c 1993/06/10 18:04:16
- ***************
- *** 1,6 ****
- /*
- Copyright 1990,1991,1992 Eric R. Smith.
- ! Copyright 1992 Atari Corporation.
- All rights reserved.
- */
-
- --- 1,6 ----
- /*
- Copyright 1990,1991,1992 Eric R. Smith.
- ! Copyright 1992,1993 Atari Corporation.
- All rights reserved.
- */
-
- ***************
- *** 34,40 ****
- #define newtimeout() (TIMEOUT *)kmalloc(SIZEOF(TIMEOUT))
- #define disposetimeout(t) kfree(t)
-
- ! TIMEOUT *
- addtimeout(delta, func)
- long delta;
- void (*func) P_((PROC *));
- --- 34,40 ----
- #define newtimeout() (TIMEOUT *)kmalloc(SIZEOF(TIMEOUT))
- #define disposetimeout(t) kfree(t)
-
- ! TIMEOUT * ARGS_ON_STACK
- addtimeout(delta, func)
- long delta;
- void (*func) P_((PROC *));
- ***************
- *** 77,83 ****
- * process
- */
-
- ! void
- cancelalltimeouts()
- {
- TIMEOUT *cur, **prev, *old;
- --- 77,83 ----
- * process
- */
-
- ! void ARGS_ON_STACK
- cancelalltimeouts()
- {
- TIMEOUT *cur, **prev, *old;
- ***************
- *** 110,116 ****
- * find it there!
- */
-
- ! void
- canceltimeout(this)
- TIMEOUT *this;
- {
- --- 110,116 ----
- * find it there!
- */
-
- ! void ARGS_ON_STACK
- canceltimeout(this)
- TIMEOUT *this;
- {
- *** 1.4 1993/03/08 21:36:20
- --- tosfs.c 1993/04/15 00:37:50
- ***************
- *** 1,6 ****
- /*
- Copyright 1991,1992 Eric R. Smith.
- ! Copyright 1992 Atari Corporation.
- All rights reserved.
- */
-
- --- 1,6 ----
- /*
- Copyright 1991,1992 Eric R. Smith.
- ! Copyright 1992,1993 Atari Corporation.
- All rights reserved.
- */
-
- ***************
- *** 1339,1350 ****
- ti = gl_ti;
- for (i = 0; i < NUM_INDICES; i++, ti++) {
- if (ti->name && ti->name[0] == dlet) {
- ! kfree(ti->name);
- ! ti->name = 0;
- ! nextf = ti->open;
- ! while ( (f = nextf) != 0 ) {
- ! nextf = f->next;
- ! f->next = 0;
- }
- ti->open = 0;
- /* if there are any cookies pointing at this name, they're not
- --- 1339,1360 ----
- ti = gl_ti;
- for (i = 0; i < NUM_INDICES; i++, ti++) {
- if (ti->name && ti->name[0] == dlet) {
- ! #ifdef NEWWAY
- ! /* only free the name if this index not used by any cookie */
- ! if (ti->links != 0)
- ! ti->valid = 0;
- ! else
- ! #endif /* NEWWAY */
- ! {
- ! kfree(ti->name);
- ! ti->name = 0;
- ! }
- ! if (!(ti->attr & FA_DIR)) {
- ! nextf = ti->open;
- ! while ( (f = nextf) != 0 ) {
- ! nextf = f->next;
- ! f->next = 0;
- ! }
- }
- ti->open = 0;
- /* if there are any cookies pointing at this name, they're not
- *** 1.4 1993/03/08 21:36:20
- --- trans.c 1993/05/25 16:40:28
- ***************
- *** 76,82 ****
- char *disp, *base, *index;
- {
- if (syntax == GAS) {
- ! return concat6(base, "@(", disp, ",", changesiz(index), ")");
- } else {
- return concat6(disp, "(", base, ",", index, ")");
- }
- --- 76,82 ----
- char *disp, *base, *index;
- {
- if (syntax == GAS) {
- ! return concat6(base, "@(", disp, ",", changesiz2(index), ")");
- } else {
- return concat6(disp, "(", base, ",", index, ")");
- }
- ***************
- *** 94,99 ****
- --- 94,143 ----
- }
-
- char *
- + postindex(bd, an , index, od)
- + char *bd, *an, *index , *od;
- + {
- + if (syntax == GAS) {
- + return concat8(an, "@(", bd, ")@(", od, ",", changesiz2(index), ")");
- + } else {
- + return concat9("([",an, ",", bd, "],", index, ",", od ,")");
- + }
- + }
- +
- + char *
- + postindex0(bd)
- + char *bd;
- + {
- + if (syntax == GAS) {
- + return concat3("@(", bd, ")");
- + } else {
- + return concat3("([", bd, "])");
- + }
- + }
- +
- + char *
- + postindex1(bd,od)
- + char *bd, *od;
- + {
- + if (syntax == GAS) {
- + return concat5("@(", bd, ")@(", od, ")");
- + } else {
- + return concat5("([", bd, "],", od, ")");
- + }
- + }
- +
- + char *
- + preindex(bd, an , index, od)
- + char *bd, *an, *index , *od;
- + {
- + if (syntax == GAS) {
- + return concat8(an, "@(", bd, ",", changesiz2(index), ")@(", od, ")");
- + } else {
- + return concat9("([",an, ",", bd, ",", index, "],", od, ")");
- + }
- + }
- +
- + char *
- do_ops(label, opcode, space, operand)
- char *label, *opcode, *space, *operand;
- {
- ***************
- *** 180,185 ****
- --- 224,244 ----
-
- while (*op) {
- if (*op == '.') *op = ':';
- + op++;
- + }
- + return r;
- + }
- +
- + char *
- + changesiz2(op) /* rw: hack for scaled index */
- + char *op;
- + {
- + char *r = op;
- +
- + if (syntax != GAS) return op;
- +
- + while (*op) {
- + if (*op == '.' || *op == '*' ) *op = ':';
- op++;
- }
- return r;
- *** 1.4 1993/03/08 21:36:20
- --- trutil.c 1993/05/25 16:40:30
- ***************
- *** 101,106 ****
- --- 101,152 ----
- return r;
- }
-
- + char *concat8(s1, s2, s3, s4, s5, s6, s7, s8)
- + char *s1, *s2, *s3, *s4, *s5, *s6, *s7, *s8;
- + {
- + size_t siz = strlen(s1) + strlen(s2) + strlen(s3)
- + + strlen(s4) + strlen(s5) + strlen(s6)
- + + strlen(s7) + strlen(s8) + 1;
- + char *r;
- +
- + r = malloc(siz);
- + if (!r) return 0;
- +
- + strcpy(r, s1);
- + strcat(r, s2);
- + strcat(r, s3);
- + strcat(r, s4);
- + strcat(r, s5);
- + strcat(r, s6);
- + strcat(r, s7);
- + strcat(r, s8);
- + return r;
- + }
- +
- + char *concat9(s1, s2, s3, s4, s5, s6, s7, s8, s9)
- + char *s1, *s2, *s3, *s4, *s5, *s6, *s7, *s8, *s9;
- + {
- + size_t siz = strlen(s1) + strlen(s2) + strlen(s3)
- + + strlen(s4) + strlen(s5) + strlen(s6)
- + + strlen(s7) + strlen(s8) + strlen(s9) + 1;
- + char *r;
- +
- + r = malloc(siz);
- + if (!r) return 0;
- +
- + strcpy(r, s1);
- + strcat(r, s2);
- + strcat(r, s3);
- + strcat(r, s4);
- + strcat(r, s5);
- + strcat(r, s6);
- + strcat(r, s7);
- + strcat(r, s8);
- + strcat(r, s9);
- + return r;
- + }
- +
- +
- static int is_word_sym(c)
- int c;
- {
- *** 1.4 1993/03/08 21:36:20
- --- tty.c 1993/04/15 00:38:10
- ***************
- *** 648,658 ****
- }
-
- /* job control check */
- ! if (tty->pgrp == 0) {
- ! /* nobody owned the terminal, so now it's ours */
- ! tty->pgrp = 0;
- ! }
- ! else if (tty->pgrp != curproc->pgrp) {
- TRACE(("job control: tty pgrp is %d proc pgrp is %d",
- tty->pgrp, curproc->pgrp));
- killgroup(curproc->pgrp, SIGTTIN);
- --- 648,655 ----
- }
-
- /* job control check */
- !
- ! if (tty->pgrp && tty->pgrp != curproc->pgrp) {
- TRACE(("job control: tty pgrp is %d proc pgrp is %d",
- tty->pgrp, curproc->pgrp));
- killgroup(curproc->pgrp, SIGTTIN);
- *** 1.4 1993/03/08 21:36:20
- --- version.h 1993/04/15 23:42:30
- ***************
- *** 1,5 ****
- #define MAJ_VERSION 1
- ! #define MIN_VERSION 4
-
- #ifndef MULTITOS
- #define BETA
- --- 1,5 ----
- #define MAJ_VERSION 1
- ! #define MIN_VERSION 6
-
- #ifndef MULTITOS
- #define BETA
- *** 1.4 1993/03/08 21:36:20
- --- welcome.c 1993/06/10 18:33:38
- ***************
- *** 47,53 ****
- * "boot MultiTOS?" messages, in various langauges:
- */
-
- - #define MAXLANG 6
-
- struct yn_message {
- const char *message; /* message to print */
- --- 47,52 ----
- ***************
- *** 75,82 ****
- struct yn_message *msg;
- int y;
-
- - if (gl_lang >= MAXLANG || gl_lang < 0)
- - gl_lang = 0;
- msg = &boot_it[gl_lang];
- Cconws(msg->message);
- y = (int) Cconin();
- --- 74,79 ----
- *** 1.4 1993/03/08 21:36:20
- --- xbios.c 1993/06/10 20:30:40
- ***************
- *** 1,6 ****
- /*
- Copyright 1990,1991,1992 Eric R. Smith.
- ! Copyright 1992 Atari Corporation.
- All rights reserved.
- */
-
- --- 1,6 ----
- /*
- Copyright 1990,1991,1992 Eric R. Smith.
- ! Copyright 1992,1993 Atari Corporation.
- All rights reserved.
- */
-
- ***************
- *** 164,176 ****
- mapin(curproc->bconmap);
-
- #ifndef DONT_ONLY030_THIS
- ! /* Note: in theory, the code below shouldn't be necessary
- ! if we're running on a 68030 chip; after all, in such a case
- ! we MUST have TOS 1.6 or better...
- ! However, the code breaks if we comment this out, even though
- ! tosvers is indeed > 0x0104. Must be a compiler bug, but it's
- ! nothing obvious!
- ! */
-
- /*
- If this is an old TOS, try to rearrange things to support
- --- 164,172 ----
- mapin(curproc->bconmap);
-
- #ifndef DONT_ONLY030_THIS
- ! /* Note: the code below must be included, even on a 68030, thanks to a bug
- ! * in the gcc and mntlib osbind.h file.
- ! */
-
- /*
- If this is an old TOS, try to rearrange things to support
- ***************
- *** 263,268 ****
- --- 259,291 ----
- (*f->dev->ioctl)(f, TCURSOFF+cmd, &op);
- }
-
- +
- + long
- + dosound(ptr)
- + char *ptr;
- + {
- + char c;
- + MEMREGION *r;
- +
- + if (!no_mem_prot) {
- + /* check that this process has access to the memory */
- + /* (if not, the next line will cause a bus error) */
- + c = *((volatile char *)ptr);
- +
- + /* OK, now make sure that interrupt routines will have access,
- + * too
- + */
- + r = addr2region((virtaddr)ptr);
- + if (r && get_prot_mode(r) == PROT_P) {
- + DEBUG(("Dosound: changing protection to Super"));
- + mark_region(r, PROT_S);
- + }
- + }
- +
- + Dosound(ptr);
- + return 0;
- + }
- +
- void
- init_xbios()
- {
- ***************
- *** 272,277 ****
- --- 295,301 ----
- xbios_tab[0x0e] = uiorec;
- xbios_tab[0x0f] = rsconf;
- xbios_tab[0x15] = cursconf;
- + xbios_tab[0x20] = dosound;
- xbios_tab[0x26] = supexec;
- xbios_tab[0x2c] = bconmap;
- }
- *** 1.4 1993/03/08 21:36:20
- --- context.spp 1993/04/21 23:52:20
- ***************
- *** 1,6 ****
- ;
- ; Copyright 1992 Eric R. Smith
- ! ; Copyright 1992 Atari Corporation
- ; All rights reserved.
-
- %include "magic.i"
- --- 1,6 ----
- ;
- ; Copyright 1992 Eric R. Smith
- ! ; Copyright 1992,1993 Atari Corporation
- ; All rights reserved.
-
- %include "magic.i"
- ***************
- *** 48,81 ****
- XDEF _save_context
- XDEF _restore_context
- XDEF _change_context
- - XDEF _set_mmu
-
- XREF _fpu
- XREF _framesizes
- XREF _new_trace ; from intr.s
- XREF _no_mem_prot
- - ;
- - ; set_mmu(crp,tc): called once, the first time a page table is built, to
- - ; switch away from the MMU setup that came from the ROM and into the setup
- - ; that we just built. The CRP is actually on the stack, and it's 8 bytes.
- - ; The TC is four bytes at sp@(0xc). "Nulls" is here because we need to
- - ; shove zeros into a few places.
- - ;
- - ; nulltc is in the data segment because otherwise GAS assembles PC-relative
- - ; and that's not legal on 68030.
- - ;
- - DATA
- - nulltc: dc.l 0
-
- TEXT
- - _set_mmu:
- - pmove nulltc,tc ; turn off mmu
- - dc.l $f0390800,nulltc ; pmove nulltc,tt0
- - dc.l $f0390c00,nulltc ; pmove nulltc,tt1
- - pmove 4(sp),crp ; caution: crp is 8 bytes
- - pmove $c(sp),tc
- - rts
- -
- _build_context:
- move.l a0,-(sp) ; save a0; we'll use it for scratch
- move.l 8(sp),a0 ; get address of save area
- --- 48,60 ----
- ***************
- *** 179,186 ****
- move.l -4(a1),C_PC(a0) ; save PC
- move.l usp,a1
- move.l a1,C_USP(a0) ; save user stack pointer
- ! move.w sr,d0
- ! move.w d0,C_SR(a0) ; save status register
- move.l ($408).w,C_TERM(a0) ; save GEMDOS terminate vector
- move.l (sp)+,C_A0(a0) ; save old a0
- moveq.l #0,d0 ; return 0
- --- 158,164 ----
- move.l -4(a1),C_PC(a0) ; save PC
- move.l usp,a1
- move.l a1,C_USP(a0) ; save user stack pointer
- ! move.w sr,C_SR(a0) ; save status register
- move.l ($408).w,C_TERM(a0) ; save GEMDOS terminate vector
- move.l (sp)+,C_A0(a0) ; save old a0
- moveq.l #0,d0 ; return 0
- ***************
- *** 194,200 ****
- ; the process we're switching to. Thus, we can change memory context
- ; to there.
-
- ! move.l C_SSP(a0),sp ; supervisor stack pointer
- move.l C_USP(a0),a1
- move.l a1,usp ; set user stack pointer
- move.l C_TERM(a0),($408).w ; restore GEMDOS terminate vector
- --- 172,181 ----
- ; the process we're switching to. Thus, we can change memory context
- ; to there.
-
- ! move.l C_SSP(a0),a1 ; get supervisor stack pointer
- ! tst.b (a1) ; touch the page for virtual memory programs
- ! tst.b -1023(a1) ; make sure stack can grow
- ! move.l a1,sp
- move.l C_USP(a0),a1
- move.l a1,usp ; set user stack pointer
- move.l C_TERM(a0),($408).w ; restore GEMDOS terminate vector
- ***************
- *** 239,246 ****
- short4: frestore C_FSTATE(a0) ; finally the internal state
- short3:
- move.l C_PC(a0),-(sp) ; push the PC
- ! move.w C_SR(a0),d0 ; fetch status register
- ! move.w d0,-(sp) ; push the status register
- tst.b C_PTRACE(a0) ; check for a pending trace
- movem.l (a0),d0-d7/a0-a6 ; restore registers d0-d7/a0-a6
- beq.s notrace
- --- 220,226 ----
- short4: frestore C_FSTATE(a0) ; finally the internal state
- short3:
- move.l C_PC(a0),-(sp) ; push the PC
- ! move.w C_SR(a0),-(sp) ; push the status register
- tst.b C_PTRACE(a0) ; check for a pending trace
- movem.l (a0),d0-d7/a0-a6 ; restore registers d0-d7/a0-a6
- beq.s notrace
- ***************
- *** 257,263 ****
- ; the process we're switching to. Thus, we can change memory context
- ; to there.
-
- ! move.l C_SSP(a0),sp ; supervisor stack pointer
- move.l C_USP(a0),a1
- move.l a1,usp ; set user stack pointer
- move.l C_TERM(a0),($408).w ; restore GEMDOS terminate vector
- --- 237,246 ----
- ; the process we're switching to. Thus, we can change memory context
- ; to there.
-
- ! move.l C_SSP(a0),a1 ; get supervisor stack pointer
- ! tst.b (a1) ; touch the page for virtual memory programs
- ! tst.b -1023(a1) ; make sure stack can grow
- ! move.l a1,sp
- move.l C_USP(a0),a1
- move.l a1,usp ; set user stack pointer
- move.l C_TERM(a0),($408).w ; restore GEMDOS terminate vector
- ***************
- *** 291,297 ****
- ; if running with a true coprocessor we need to restore the FPU state
-
- tst.w _fpu ; is there a true FPU in the system
- ! beq.s short3
- tst.b C_FSTATE(a0) ; if NULL frame then the FPU is not in use
- beq.s short5 ; skip programmer's model restore
- fmovem.l C_FCTRL(a0),fpcr/fpsr/fpiar ; restore control registers
- --- 274,280 ----
- ; if running with a true coprocessor we need to restore the FPU state
-
- tst.w _fpu ; is there a true FPU in the system
- ! beq.s short6
- tst.b C_FSTATE(a0) ; if NULL frame then the FPU is not in use
- beq.s short5 ; skip programmer's model restore
- fmovem.l C_FCTRL(a0),fpcr/fpsr/fpiar ; restore control registers
- ***************
- *** 299,306 ****
- short5: frestore C_FSTATE(a0) ; finally the internal state
- short6:
- move.l C_PC(a0),-(sp) ; push the PC
- ! move.w C_SR(a0),d0 ; fetch status register
- ! move.w d0,-(sp) ; push the status register
- tst.b C_PTRACE(a0) ; check for a pending trace
- movem.l (a0),d0-d7/a0-a6 ; restore registers d0-d7/a0-a6
- beq.s notrace2
- --- 282,288 ----
- short5: frestore C_FSTATE(a0) ; finally the internal state
- short6:
- move.l C_PC(a0),-(sp) ; push the PC
- ! move.w C_SR(a0),-(sp) ; push status register
- tst.b C_PTRACE(a0) ; check for a pending trace
- movem.l (a0),d0-d7/a0-a6 ; restore registers d0-d7/a0-a6
- beq.s notrace2
- *** 1.4 1993/03/08 21:36:20
- --- cpu.spp 1993/05/24 23:24:00
- ***************
- *** 1,7 ****
- ;
- ! ; CPU tricks (we should probably have spl7(), spl() & reboot() in here)
- ;
- TEXT
- ;
- ; Cache tricks
- ;
- --- 1,50 ----
- ;
- ! ; CPU tricks (mostly having to do with the MMU)
- ;
- + ;
- + ; set_mmu(crp,tc): called once, the first time a page table is built, to
- + ; switch away from the MMU setup that came from the ROM and into the setup
- + ; that we just built. The CRP is actually on the stack, and it's 8 bytes.
- + ; The TC is four bytes at sp@(0xc). "Nulls" is here because we need to
- + ; shove zeros into a few places.
- + ;
- + TEXT
- + nulltc: dc.l 0
- +
- + XDEF _set_mmu
- + _set_mmu:
- + pmove (nulltc).l,tc ; turn off mmu
- + dc.l $f0390800,nulltc ; pmove nulltc,tt0
- + dc.l $f0390c00,nulltc ; pmove nulltc,tt1
- + pmove 4(sp),crp ; caution: crp is 8 bytes
- + pmove $c(sp),tc
- + rts
- + ;
- + ; save_mmu, restr_mmu: save and restore the MMU setup that came from ROM
- + ;
- + BSS
- + oldcrp ds.l 2
- + oldtc ds.l 1
- + oldtt0 ds.l 1
- + oldtt1 ds.l 1
- +
- TEXT
- + XDEF _save_mmu
- + _save_mmu:
- + pmove tc,oldtc
- + dc.l $f0390a00,oldtt0 ; pmove tt0,oldtt0
- + dc.l $f0390e00,oldtt1 ; pmove tt1,oldtt1
- + pmove crp,oldcrp
- + rts
- +
- + XDEF _restr_mmu
- + _restr_mmu:
- + pmove (nulltc).l,tc
- + dc.l $f0390800,oldtt0 ; pmove oldtt0,tt0
- + dc.l $f0390c00,oldtt1 ; pmove oldtt1,tt1
- + pmove oldcrp,crp
- + pmove oldtc,tc
- + rts
- ;
- ; Cache tricks
- ;
- ***************
- *** 73,76 ****
- --- 116,126 ----
- move.l (sp)+,sp ; set stack pointer
- jmp (a0) ; return
-
- + ;
- + ; PMMU stuff
- + ;
- + XDEF _flush_pmmu
- + _flush_pmmu:
- + pflusha
- + rts
- END
- *** 1.4 1993/03/08 21:36:20
- --- intr.spp 1993/04/20 16:24:38
- ***************
- *** 16,23 ****
- ori.w #$0700,sr
- rts
- _spl:
- ! move.w 4(sp),d0
- ! move.w d0,sr
- rts
-
- XDEF _mint_5ms
- --- 16,22 ----
- ori.w #$0700,sr
- rts
- _spl:
- ! move.w 4(sp),sr
- rts
-
- XDEF _mint_5ms
- *** 1.4 1993/03/08 21:36:20
- --- syscall.spp 1993/04/15 00:37:34
- ***************
- *** 97,103 ****
- ; calls a GEMDOS function (Srealloc) and so
- ; we must *not* change any of the vectors!!
-
- ! btst #13,(sp) ; test for user/super mode
- beq LX_usr
- %ifdef ONLY030
- lea 8(sp),a1
- --- 97,103 ----
- ; calls a GEMDOS function (Srealloc) and so
- ; we must *not* change any of the vectors!!
-
- ! btst #5,(sp) ; test for user/super mode
- beq LX_usr
- %ifdef ONLY030
- lea 8(sp),a1
-