/* include not needed for Aztec C using provided makefile */
#include "sb:sb.h"
extern int level;
extern void PrWindow2(), PrWindow3();


void PrWindow(string, window) char *string; struct Window *window;
{
static struct StructData structdata[] = {
     { " NextWindow",   "struct Window *",     5, PTRSIZE },
     { "-LeftEdge",     "SHORT",               2, INTSIZE },
     { "-TopEdge",      "SHORT",               2, INTSIZE },
     { "-Width",        "SHORT",               2, INTSIZE },
     { "-Height",       "SHORT",               2, INTSIZE },
     { "-MouseY",       "SHORT",               2, INTSIZE },
     { "-MouseX",       "SHORT",               2, INTSIZE },
     { "-MinWidth",     "SHORT",               2, INTSIZE },
     { "-MinHeight",    "SHORT",               2, INTSIZE },
     { "-MaxWidth",     "SHORT",               2, INTSIZE },
     { "-MaxHeight",    "SHORT",               2, INTSIZE },
     { " Flags",        "ULONG",              11, PTRSIZE },
     { "(MenuStrip",    "struct Menu *)",      5, PTRSIZE },
     { " Title",        "UBYTE *",             4, PTRSIZE },
     { "(FirstRequest", "struct Requester *)", 5, PTRSIZE },
     { "(DMRequest",    "struct Requester *)", 5, PTRSIZE }
  };
static char *flagnames[32] = {
     "WINDOWSIZING",    "WINDOWDRAG",   "WINDOWDEPTH",    "WINDOWCLOSE",
     "SIZEBRIGHT",      "SIZEBOTTOM",   "SIMPLE_REFRESH", "OTHER_REFRESH",
     "BACKDROP",        "REPORTMOUSE",  "GIMMEZEROZERO",  "BORDERLESS",
     "ACTIVATE",        "WINDOWACTIVE", "INREQUEST",      "MENUSTATE",
     "RMBTRAP",         "NOCAREREFRESH", NULL,            NULL,
     NULL,              NULL,            NULL,            NULL,
     "WINDOWREFRESH",   "WBENCHWINDOW",  "WINDOWTICKED"
  };
int sum, choice = -1;
ULONG bits;
  level++;
  while (choice) {
    sum = SetOptionText(string, structdata, (APTR)window, DATASIZE, 0);
    switch (choice = GetChoice(MAXGADG + 1)) {
      case 1:
        if (window->NextWindow)
          PrWindow("The next window in Intuition's list", window->NextWindow);
        break;
      case 12:
        bits = window->Flags & ~SUPER_UNUSED;
        switch ((bits & REFRESHBITS) >> 6) {
          case 0:
            flagnames[6] = "SMART_REFRESH";
            bits |= 0x40;
            break;
          case 1:
            flagnames[6] = "SIMPLE_REFRESH";
            break;
          case 2:
            flagnames[7] = "SUPER_BITMAP";
            break;
           3, BYTESIZE },
     { "-AOlPen",     "BYTE",                3, BYTESIZE },
     { "-DrawMode",   "BYTE",                3, BYTESIZE },
     { "-AreaPtSize", "BYTE",                3, BYTESIZE },
     { "-linpatcnt",  "BYTE",                3, BYTESIZE },
     { "-dummy",      "BYTE",                3, BYTESIZE },
     { "(Flags",      "USHORT",             12, INTSIZE  },
     { "-LinePtrn",   "USHORT",             12, INTSIZE  }
  };
int sum, choice = -1;
  level++;
  while (choice) {
    sum = SetOptionText(string, structdata,
                        (APTR)rastport, DATASIZE, 0);
    switch (choice = GetChoice(MAXGADG + 1)) {
      case 2:
        if (rastport->BitMap)
          PrBitMap("The BitMap for the RastPort", rastport->BitMap);
        break;
      case MOREGADG:
        PrRastPort2("More RastPort members", rastport, sum);
        break;
    }
  }
  level--;
}


void PrRastPort2(string, rastport, offset)
char *string; struct RastPort *rastport; int offset;
{
static struct StructData structdata[] = {
     {"-cp_x",            "SHORT",             2, INTSIZE     },
     {"-cp_y",            "SHORT",             2, INTSIZE     },
     {" minterms[8]",     "UBYTE",             0, BYTESIZE * 8},
     {"-PenWidth",        "SHORT",             2, INTSIZE     },
     {"-PenHeight",       "SHORT",             2, INTSIZE     },
     {"(TextFont",        "struct Font *)",    5, PTRSIZE     },
     {"-AlgoStyle",       "UBYTE",            13, BYTESIZE    },
     {"(TxFlags",         "UBYTE",            13, BYTESIZE    },
     {"-TxHeight",        "UWORD",            12, INTSIZE     },
     {"-TxWidth",         "UWORD",            12, INTSIZE     },
     {"-TxBaseLine",      "UWORD",            12, INTSIZE     },
     {"-TxSpacing",       "WORD",              2, INTSIZE     },
     {"-RP_User",         "WORD",              2, INTSIZE     },
     {" wordreserved[7]", "UWORD",             0, INTSIZE * 7 },
     {" longreserved[2]", "ULONG",             0, PTRSIZE * 2 },
     {" reserved[8]",     "UBYTE",             0, BYTESIZE * 8}
  };
int sum, choice = -1;
  level++;
  while (choice) {
    sum = SetOptionText(string, structdata,
                        (APTR)rastport, DATASIZE, offset);
    switch (choice = GetChoice(DATASIZE)) {
      case 3:
        HexDump("Hexdump of RastPort minterms bytes",
                &rastport->minterms[0], BYTESIZE, (long)BYTESIZE * 8);
        break;
      case 14:
        HexDump("Hexdump of reserved RastPort words",
                &rastport->wordreserved[0], INTSIZE, (long)INTSIZE * 7);
        break;
      case 15:
        HexDump("Hexdump of reserved RastPort longwords",
                &rastport->longreserved[0], PTRSIZE, (long)PTRSIZE * 2);
        break;
      case 16:
        HexDump("Hexdump of reserved RastPort bytes",
                &rastport->reserved[0], BYTESIZE, (long)BYTESIZE * 8);
        break;
    }
  }
  level--;
}
     Ü`);
 Signal(memyselfNi,mymask); /* Wake up monitoring task he will grab the data */
 ObtainSemaphore(&canreturn); /* we get this guy when we CAN return */	
 ReleaseSemaphore(&canreturn);

 return(mymess); 
} 

/*
 * memfill() - fill memory with supplied byte value for "size" bytes
 */
void memfill(source,size,value)
UBYTE *source;
ULONG size;
UBYTE value;	
{
 register UBYTE *msource=source,
		mvalue=value;
 register ULONG msize=size;

 if(msize)
  {
   do
    {
     --msize;
     msource[msize] = mvalue;
    } while(msize);

  }
}

/*
 * This code stub has been known to save lives... 
 */

#if MANX 	
#asm
	XREF _packetwait		

 	XDEF _pw
_pw:
	movem.l a2/a3/a4,-(sp)
	jsr _packetwait
	movem.l (sp)+,a2/a3/a4
	rts
#endasm
#endif

/* end of procdev.c */
en     Ù`			them in QUOTES. The single quote will yield an ascii
			value, and the double quote will yield an ascii value
			with bit 7 SET (or'd with 128). Multiple byte constants
			are evaluated by successive left-shifts. Only the last
			4 characters are retained as a 32-bit value.

Some Examples:	The number 1,000 (one thousand) may be represented
		any one of the following ways:

		1111101000B	01111101000b	%1111101000
		1750Q		01750o		@1750
		1000D		0001000d	1000
		3e8H		03E8h		$3e8
		'E0'-'AH'

==============================================================================

			Assembly Line Format:

   An input assembly line follows the following models:

Label1		Mnemonic	Operand , MoreOperands ;comment
 Label2:	Mnemonic	Operand
		Mnemonic	Operand
Label3:		Mnemonic
LabelOnly
* 					a comment only
	;				another comment

   Note that the LABEL either starts in the first column, or is followed by
a colon. The Mnemonic field is separated by at least one space or tab, and
never starts in the first column. Operands, where needed, follow, separated
from the Mnemonic by at least one space or tab. Multiple operands are
separated from each other by a comma (the comma flags the assembler that
there is another operand available.) An asterisk in the first position on the
line indicates a comment only line, or comments may follow complete operands
with a semicolon separator. Assembler directives occupy the