home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
EFFO
/
forum5.lzh
/
SPRACHEN
/
ASSEMBLER
/
break.a
< prev
next >
Wrap
Text File
|
1987-03-13
|
2KB
|
67 lines
NAM BREAK
TTL Call System debugger
*********************************
* BREAK *
* Call System debugger *
* Disassembled 1987 by L.Zeller *
*********************************
USE /dd/defs/defsfile
VERSION EQU 0 program version number
REVISION EQU 0 revision count
EDITION EQU 8 edition count
* Versions / Revisions
* 0.0 : object code at disassembly time
* Edition History
* ---------------
* 008 : object code at disassembly time
TYPELANG EQU (Prgrm<<8)+Objct
ATTREV EQU (ReEnt<<8)+REVISION
STACKSIZ EQU 256
PSECT break,TYPELANG,ATTREV,EDITION,STACKSIZ,BREAKENT
STDIN EQU 0 standard input
STDOUT EQU 1 standard output
STDERR EQU 2 standard output
VSECT
ENDS
* Program code
* ============
USETEXT DC.B "Syntax: break",$0D
DC.B "Function: invokes the system level debugger",$0D
DC.B " (You must be the super user)",$0D
BREAKTXT DC.B "(breakpoints stop timesharing.)",$0D
DC.B "Timesharing resumed.",$0D
* entry point
BREAKENT SUBQ.L #3,D5 less than 3 bytes parameters ?
BCS.S BRK1 ..yes --> ok
CMPI.B #'-,(A5)+ option specified ?
BNE.S BRK1 ..no --> ok
CMPI.B #'?,(A5)+ help option ?
BNE.S BRK1 ..no --> ok
BRK2 LEA USETEXT(PC),A0 ptr to help text
BRA.S BRK3
BRK1 TST.L D1 superuser ?
BNE.S BRK2 ..no --> display help text
MOVEQ #0,D1
OS9 F$SysDbg call system debugger
LEA BREAKTXT(PC),A0 ptr to return-from-debugger text
BRK3 MOVEQ #STDOUT,D0
MOVEQ #-1,D1 as much as you can
OS9 I$WritLn display message
MOVEQ #0,D1 no errors
OS9 F$Exit exit
ENDS