🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by taylor Thu, 11 May 1989 08:43
gas ns32k md_parse_option
#1599
Author: taylor
Date: Thu, 11 May 1989 08:43
112 lines
2937 bytes
Here's some changes for ns32k.c (primarily md_parse_option) that allow
you to specify on the command line whether you want to assemble for a
NS32032 or a NS32532.

With these changes, defining NS32032 or NS32532 at compile time only
affects which of the two processors it assembles for by default -- i.e.
when you don't specify either one on the command line.

That is, you'd say:

	a32k -m32032 file.s     # to assemble for a 32032
	a32k -m32532 file.s     # to assemble for a 32532
	a32k file.s             # to assemble for whichever the default is.

NOTE:  I edited the following diff slightly to get rid of differences
that were simply formatting differences (which I made because some
things like case statements didn't always line up under one another in
the original).  If I screwed up the diff, let me know and I'll mail the
full diff.

Anyway, here's the (edited) rcsdiff output.

RCS file: RCS/ns32k.c,v
retrieving revision 1.3
diff -b -c1 -r1.3 ns32k.c
*** /tmp/,RCSt1a24254	Thu May 11 04:01:05 1989
--- ns32k.c	Thu May 11 03:52:03 1989
***************
*** 232,235 ****
  
! #ifdef NS32532
! struct option cpureg[]= /* lpr spr */
  {
--- 232,234 ----
  
! struct option cpureg_532[]= /* lpr spr */
  {
***************
*** 250,252 ****
  };
! struct option mmureg[]= /* lmr smr */
  {
--- 249,251 ----
  };
! struct option mmureg_532[]= /* lmr smr */
  {
***************
*** 261,266 ****
  };
- #endif
  
! #ifdef NS32032
! struct option cpureg[]= /* lpr spr */
  {
--- 260,263 ----
  };
  
! struct option cpureg_032[]= /* lpr spr */
  {
***************
*** 275,277 ****
  };
! struct option mmureg[]= /* lmr smr */
  {
--- 272,274 ----
  };
! struct option mmureg_032[]= /* lmr smr */
  {
***************
*** 289,290 ****
--- 286,293 ----
  };
+ #if defined(NS32532)
+ struct option *cpureg = cpureg_532;
+ struct option *mmureg = mmureg_532;
+ #else
+ struct option *cpureg = cpureg_032;
+ struct option *mmureg = mmureg_032;
  #endif
***************
*** 1636,1637 ****
--- 1647,1669 ----
  {
+     switch (**argP) {
+     case 'm':
+ 	(*argP)++;
+ 
+ 	if (!strcmp(*argP, "32032")) {
+ 	    cpureg = cpureg_032;
+ 	    mmureg = mmureg_032;
+ 	} else if (!strcmp(*argP, "32532")) {
+ 	    cpureg = cpureg_532;
+ 	    mmureg = mmureg_532;
+ 	} else
+ 	    as_warn("Unknown -m option ignored");
+ 
+ 	while (**argP)
+ 	    (*argP)++;
+ 
+ 	break;
+ 
+     default:
+ 	return 0;
+     }
      return 1;

That's it.

David
--
David Taylor
taylor@think.com, ...!think!taylor
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads