KOTEKAN.DOC
Oct. 9. 1989

----
SVC:
Need toggle attribute VCS code
Need validation of R6 on all system calls
Also check M_SMOC to be sure device is ready, wait if not
Only system call can lock or unlock devices to ensure that application
  switching doesn't sneak through a crack
Need reset and init commands for devices to reset, change baud rates, etc.
APP_BASE, WIN_BASE must be in heap for variable #s of applications/windows
M_VCA must be in APP_BASE and one for each application
Printer should trap CLEAR SCREEN command and do form feed instead
Inter-program communication device with special H'9x control code
Use SBITB with special locking bit array for all multi-apps locking/unlocking
?? Possibly combine insert/delete video commands ??
  Bit 1 = insert/delete
  Bit 0 = backwards/forwards
  Frees up another category
S1I_BLK should trap VC_LIT code, display with dim/reverse attributes
Supervisor call to get/set config status
SVC should initialize ALL registers before jump to DEBUGGER
Control code to display page number
Possibly use FCB for any open device - allows nested opens and 
     closes
Possibly nested open just checks status (open and lock), locks if 
     not already done.
Possibly add another device index to correlate R6 with physical 
     devices.  Allows XOFF, etc with re-route, access from 
     several R6 devices, etc.  Must not be dependent on R4 data 
     block.
Possibly need device counter for open/close, allows nested opens 
     and closes.
Possibly add another data block to accompany DOF_DAT block for 
     XOFF, and other hardware dependent parameters, only 1 common 
     block for all devices sharing same hardware device.
Device initialization:  Allocate physical/logical buffers 
     according to stored size.  Call device with initialization 
     command.  Device may use local storage above DOF_DAT table 
     if space allocated in device block along with DOF_DAT size.
Need macros for parallel transfer protocal to replace 
     conditionals.
New devices may be added by adding to table and re-initializing 
     storage.
Device loading/initialization - vectors are offset from base of 
     device data block, not from SVC.  Pass absolute base address 
     of device block to SVC for initialization as DEV_INIT 
     routine does now.
Command routine initialized from table holding command count, 
     command codes and relative offset of processing routine.
XMI_SST, XMO_STAT should synchronize DAT_BRDX, DAT_BWTX.
WIN_BASE should be pointer to data block like other storage.
Releasing heap storage should concatenate adjoining unused 
     blocks.
Need another lock bit so FAT, etc. may be access protected while 
     an application is updating.
???Math stack and linker storage application dependent???
XON/XOFF uses _IO, not _SIO.
Re-route should accept optional R4 block and optional re-route 
     enable bit.  Keep upper bits of R6.
SVC_BSR must check for and respond to re-route/link.
SVC should always call SVC_LINK if link fild <> -1.  SVC_LINK 
     checks link bit/enable and handles it as needed.
Need null device

---------
Debugger:
Calculate command should display mode and value
Change AI to use full assembly routine but with input from keyboard
  STOP required to end
LD displays all on one line
Symbol undefined error should display symbol name
??MATH pseudo-op just does whatever expression wants??
COND for 24/32 bit addresses
Assembler listings should display value of EQU or SET in object code column
LINE pseudo-op fetches or sets list/source line number
Consolidate EX and EXP_GNSB, M_PASS="C" if calculating
SHB, SHW pseudo-ops to shift 8 or 16 bits left
Edit float/long command
Look command needs command line with auto repeat
Accept B0-BF as pseudo registers
Make math operators accept leading and trailing "."s
DM,DZ pseudo-ops
"D" command displays labels as they appear
Digit count option should work with DSP_TOS, display leading 0s
 if M_DIG>actual digit count
B_MODE code B'0011 is PC data block for link symbol table
General purpose output buffer like STR_OUT/R0/R1, uses window parameters and
  is routable with attributes to any device
Abort trap like breakpoints for monitoring memory locations (test, command)
  support non-sequential trace in MMU
When listing, display <BPT n> if appropriate after opcodes
Line recall and edit
Full screen edit
Display routine for long strings with break positions inserted
Dump width determined by screen size
BYTE, MESG etc options in disassembler, store addresses for modes
Command to set baud rate; handshake mode, XON/XOFF, ETX/ACK, none
GET_DEVIC et. al. should use SVC, no code in MON32.
MON32 Re-route should use SVC, no code in MON32.
TA command needed to advance PC but not do anything else.
System status routine to show memory size, symbol table size, 
     etc.
Clean up RF floating point display - RFF/RFL display commands.
FPU simulator should verify validity of floating parameters 
     (exponent not all 0s or all 1s).
Default window assignable to each command.
Non-sequential trace list option to show all code traced.
Support for dual space U/S.

------
Menus:
  Radio buttons with identifier to allow multiple groups
  Check boxes
  Analog controls
  Item to return string when tagged
  Command line input switched in when any key pressed if no item match
  DC_ commands for NXT_ITEM, END_ITEM, VSTR_NXT, WIN_SRCH with count
  Multiple character matches if multiple same 1st characters
  Line input doesn't display if echo not enabled
  True up/down movement by cursor position in items
  Numeric input routine with conversions

----------
Assembler:
Printouts:
 SUBTITLE,TITLE, page eject pseudo-ops
 WIDTH maxcol, max object byte to list
 PAGE #,length
B_SIZE code B'0111 = 64 bit integer
Is it possible to do EQU's within FP storage block? - not now
Make general error routine, just pass text, FS on exit
Switch to allow IF/ELSE/UNTIL/etc. in symbol table for debugger
  Debugger displays <IF> instead of label
Label definition must match previously defined foward reference mode
Line counter should be resettable with pseudo-op
MACRO/String index using 1st 3 letters and length for quick check
Redo opcode search, check last letter 1st, table leaves off last B/W/D/F/L
Assembly list routine checks for REG pseudo-op instead of R4<>0
TAB pseudo-op enables/disables tab expansion
FIELD should handle any length, BIT pseudo-op for indefinite length bits
Clear all ";" lines inserted because of assembler bugs
ENDW/ENDU/ORIF only use min required size
QUIT/IF/ELSE/WHILE accept optional :B/W/D
Pass 2 FP/SP phase check at DS (at least negative values)
1st positive DS indicates offset for following DS's; check exit offset
:$ convert constants to string; :B etc. treats string as label, converts
Undefined symbols errors should not stop entry onto stack
Determine approx. memory requirements (stack and SB)
Some kind of common block for linker
 MODE @,name stores name and current value in symbol table
EQ$ pseudo-op always does string
CHECK psuedo-op: CHECK Rn,min:x,max:x,src; parameters in-line, x default :D
 BSR beyond size MOVD TOS,reg, CHECK:x Rn,Rn,src
  or
 CHECK *+6, BR *+size
Need link command to set EQU value
"|" chains next line to current line
Array for line number/PCPTR link
Clean up BYT_P? and DSP_P?
  Phase error at BYT_OK if R6 out of range
Debugger "D" command should accept count in Words or Dwords
Keyboard capture buffer
String storage assigned starting with first linear entry in symbol table:
  Garbage collection in string storage easy because symbols are already
  sorted by ascending address
Need ACCEPT pseudo-ops
Need ACB <Rn> pseudo-op for repeated loops
RPN, RADIX, "?" pushes current value onto stack
JOIN pseudo-op connects 2 modes (PC,SB,etc) together
Need CHKSUM <begin,end,label> pseudo-op
Assembler switches for auto features:
  Digit larger than default radix, 0 default in addressing modes
T_SYMFP should not be changed by I, AI commands
Quoted characters evaluate to a string
     Strings of 4 or fewer characters stored in label pointer 
     position.
     GM, math convert strings < 5 characters to integer
     Clean up DB string processing with above
&$<> should be blank
Check all M_DOLST listing options
     I LIST 1 lists on pass "I" but PPRINT doesn't list unless 
     P1LIST is on.
CXP should declare undefined, non-globals to be external
Need routine to install or verify 2nd pass immediate displacements
  instead of DSP_PI in OPS32.MAC
!!!OUT OF MEMORY in macro crashes!!!
Nested conditionals should check for BR at destination, bypass if 
     possible.
Check for MOD_INDX overflow.
:E must also alter symbol table entry to be useful.
SYM2SUB must not return any PC, SB labels outside current module.  
     Maybe return as external undefined.  Define another routine 
     to check for global references.
GLOBAL, EXTRN declarations should use current mode as default.
Compression pass following pass 1 to compress forward references 
     if possible.  Keep pseudo-PC pointer current according to 
     1st pass so offsets may be calculated.  Don't create link 
     references until compression pass.
INS/EXT check should verify that starting bit+bit count <=32.
Variable storage labels should contain assigned size for possible 
     error checks (moving Dword to Byte, etc.).
ALIGN should accept optional filler character.
SPROC like PROC but uses SP addressing mode.
PQUIT cc,expr allows variable stack parameters, early exit.


-------
Linker:
Linker "@" address display must set M_SYMBEG and END for current 
     module since PC label display will search entire symbol 
     table otherwise.
MOV_LNK should use PSHV unless undefined or outside current 
     module.
!!!BLNK_OR doesn't handle undefined values!!!
Linker should join modules with same name, modname index should 
     be same.

------------
Disassembler
Need switch to disable <..> labels and values
Need definable column positions for each major field, 0=off
External disassembly should be symbolic like QD display.
MODE FP/SP should define local block like LPROC does.
