Skip to content

Commit 4b59e1f

Browse files
committed
Change DEBUG flag to DEBUG_PRINT so I can control when it is on
1 parent d53900b commit 4b59e1f

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ Breakpoints_v2.xcbkptlist
77
*.lst
88
*.s19
99
*.sym
10+
Fwd_refs

as9/as.c

+4-5
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ int main(int argc, char** argv)
3535
{
3636
char **np;
3737
char *pc;
38-
//FILE *fopen();
3938
int j = 0;
4039

4140
if(argc < 2){
@@ -124,7 +123,7 @@ void initialize(void)
124123
{
125124
int i = 0;
126125

127-
#ifdef DEBUG
126+
#ifdef DEBUG_PRINT
128127
printf("Initializing\n");
129128
#endif
130129
Err_count = 0;
@@ -164,7 +163,7 @@ void initialize(void)
164163

165164
void re_init(void)
166165
{
167-
#ifdef DEBUG
166+
#ifdef DEBUG_PRINT
168167
printf("Reinitializing\n");
169168
#endif
170169
Pc = 0;
@@ -211,7 +210,7 @@ void open_files(void)
211210
void make_pass(void)
212211
{
213212
char *pc;
214-
#ifdef DEBUG
213+
#ifdef DEBUG_PRINT
215214
printf("Pass %d\n",Pass);
216215
#endif
217216
while( fgets(Line,MAXBUF,Fd) ){
@@ -266,7 +265,7 @@ int parse_line(void)
266265
}
267266
*pcto = EOS;
268267

269-
#ifdef DEBUG
268+
#ifdef DEBUG_PRINT
270269
printf("Label-%s-\n",Label);
271270
printf("Op----%s-\n",Op);
272271
printf("Operand-%s-\n",Operand);

as9/eval.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ int eval(void)
4848
int left,right; /* left and right terms for expression */
4949
char o; /* operator character */
5050

51-
#ifdef DEBUG
51+
#ifdef DEBUG_PRINT
5252
printf("Evaluating %s\n",Optr);
5353
#endif
5454
Force_byte = NO;
@@ -79,7 +79,7 @@ int eval(void)
7979
}
8080

8181
Result= left;
82-
#ifdef DEBUG
82+
#ifdef DEBUG_PRINT
8383
printf("Result=%x\n",Result);
8484
printf("Force_byte=%d Force_word=%d\n",Force_byte,Force_word);
8585
#endif
@@ -199,7 +199,7 @@ int get_term(void)
199199
val = 0;
200200

201201
if(minus) val=-val;
202-
#ifdef DEBUG
202+
#ifdef DEBUG_PRINT
203203
printf("Term=%x\n",val);
204204

205205
#endif

as9/ffwd.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void fwdreinit(void)
3636
lseek(Forward,0L,ABS); /* rewind forward refs */
3737
read(Forward,&Ffn,sizeof(Ffn));
3838
read(Forward,&F_ref,sizeof(F_ref)); /* read first forward ref into mem */
39-
#ifdef DEBUG
39+
#ifdef DEBUG_PRINT
4040
printf("First fwd ref: %d,%d\n",Ffn,F_ref);
4141
#endif
4242
}
@@ -56,17 +56,17 @@ void fwdmark(void)
5656
void fwdnext(void)
5757
{
5858
ssize_t stat = read(Forward,&Ffn,sizeof(Ffn));
59-
#ifdef DEBUG
59+
#ifdef DEBUG_PRINT
6060
printf("Ffn stat=%ld ",stat);
6161
#endif
6262
stat = read(Forward,&F_ref,sizeof(F_ref));
63-
#ifdef DEBUG
63+
#ifdef DEBUG_PRINT
6464
printf("F_ref stat=%ld ", stat);
6565
#endif
6666
if( stat < 2 ){
6767
F_ref=0;Ffn=0;
6868
}
69-
#ifdef DEBUG
69+
#ifdef DEBUG_PRINT
7070
printf("Next Fwd ref: %d,%d\n",Ffn,F_ref);
7171
#endif
7272
}

as9/symtab.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ int install(char* str, int val)
2424
return(NO);
2525
}
2626
/* enter new symbol */
27-
#ifdef DEBUG
27+
#ifdef DEBUG_PRINT
2828
printf("Installing %s as %d\n",str,val);
2929
#endif
3030
np = (struct nlist *) alloc(sizeof(struct nlist));

as9/util.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void eword(int wd)
8585
*/
8686
int emit(int byte)
8787
{
88-
#ifdef DEBUG
88+
#ifdef DEBUG_PRINT
8989
printf("%2x @ %4x\n",byte,Pc);
9090
#endif
9191
if(Pass==1){

0 commit comments

Comments
 (0)