# .sh 2 "commnmac 1.2 7/29/86" 
# 
#just comment
defcom Mdisp ("a":I:0:16383:0:"address"
n:I:1:16383:128:"npoints"
"t":I:1:5:2:"1-internal, 2-external, 3-scale, 4-ROM, 5-extrabit")
##Display memory. Use the Afmt and Dfmt to change display format

defcom test ()
##Test the board (internal and external RAM, ROM, instructions, etc.)

defcom Mmove ("n":I:1:16383:128:"number of points"
sad:I:0:16383:0:"source starting address"
dad:I:0:16383:0:"destination starting address"
src:I:1:3:2:"source or destination (1-internal, 2-external, 3-scale)"
dst:I:1:3:2:"source or destination (1-internal, 2-external, 3-scale)")
##Move data between internal and external memory

defcom compare ("n":I:1:16383:128:"number of points"
sad:I:0:16383:0:"source starting address"
dad:I:0:16383:0:"destination starting address"
src:I:1:3:2:"source or destination (1-internal, 2-external, 3-scale)"
dst:I:1:3:2:"source or destination (1-internal, 2-external, 3-scale)")
##Compare data between internal and external memory

defcom Vset ("var":I:1:4:1:"1-dbg, 2-expnd, 3-addbs, 4-dbs"
val:I:0:65535:0:"value")
# invisible command ##Show and set various default values

defcom reset ()
##Reset the board and the VSP

defcom MBF ("a":I:0:16383:0:"address"
n:I:0:16383:128:"npoints"
v:I:0:65535:0:"value"
"t":I:1:3:2:"1-internal, 2-external, 3-scale")
##Fill a block of memory with one value

defcom MIF ("a":I:0:16383:0:"address"
"t":I:1:3:2:"1-internal, 2-external, 3-scale")
##Interactively fill memory. Type "q" to exit

defcom run ("a":I:-1:16383:0:"address")
##Start executing a vsp program at location address

defcom step ("n":I:0:16383:1:"Number of instructions"
a:I:-1:16383:-1:"Starting address (default-continue from last location)")
##Step (execute) n instructions or display the next execution address

defcom continue ()
##Continue execution from the last break point

defcom breakpoint ("n":I:0:11:0:"Breakpoint number"
"a":I:0:16383:0:"Address")
##Set or display the breakpoints

defcom dos ()
##Go to DOS to execute commands. Return by typing EXIT.

defcom Rdisp ()
##Display the value of the VSP internal registers

defcom disasm (a:I:0:16383:0:"Starting address"
"n":I:0:16383:1:"Number of instructions"
"mode":I:0:1:0:"mode (0-logical, 1-literal)")
##Disassemble n instructions starting at address

defmac Lhelp ("command":S:"":"command")
##Print long help information for all the commands
!help $1 2
endmac

defmac Afmt (f:I:1:3:3:"1-octal, 2-decimal, 3-hex")
##Set the address format for memory display (Mdisp command)
!vset 3 $1
endmac

defmac Dfmt (f:I:1:3:3:"1-octal, 2-decimal, 3-hex")
##Set the data format for memory display (Mdisp command)
!vset 4 $1
endmac

