;**************************************
; BLOWUP.M68  - blows up the system
; Usage: .BLOWUP
; by "MR. X"
;***************************************

       SEARCH SYS                 ; search the normals
       SEARCH SYSSYM
       SEARCH TRM

       OBJNAM BLOWUP.LIT          ; Define final product

       MOV   #0,A1                ; A0 points to byte "0"
LOOP:  CLR   (A1)+                ; 4 bytes are cleared, A1 bumped
       BR    LOOP                 ; do it again (system soon to crash)

       EXIT                       ; never get here....
       END                        ; tell assembler "end of source file"


;*****************************************************
; ASCII.M68 - Displays "ABC...xyz" to the screen
; Usage: ASCII
; by Dave Heyliger
;*****************************************************

       SEARCH SYS                 ; search the normals....
       SEARCH SYSSYM
       SEARCH TRM

       OBJNAM ASCII.LIT           ; define final product
       PHDR  -1,0,PH$REE!PH$REU   ; define header (re-entrant & re-usable)

       MOV   #'A,D1               ; initialize data register
LOOP:  TTY                        ; type out contents of D1
       INC   D1                   ; get next letter
       CMP   D1,#'z+1             ; time to quit?
       BNE   LOOP                 ; nope, perform loop again
       CRLF                       ; yup, RETURN
       EXIT                       ; and back to the dot
       END                        ; inform assembler end of source code


;*********************************************
; BADONE.M68 - A "How not to program" program
; Usage: BADONE
; by "MR. X"
;*********************************************

       SEARCH SYS                 ; search the normals...
       SEARCH SYSSYM
       SEARCH TRM

       OBJNAM BADONE.LIT          ; define final product
       PHDR  -1,0,PH$REE!PH$REU   ; "Good programming" ... ? ? ?

       TYPECR <Let's Count!>      ; what the program does...
       LEA   A1,BUFFER            ; A1 points to memory location "BUFFER"
       MOV   #1,@A1               ; BUFFER = 1

LOOP:  SLEEP #500.                ; sleep for just a bit
       MOV   @A1,D1               ; then get BUFFER value into D1
       DCVT  0,OT$TRM             ; type out D1 to the screen in decimal
       INC   @A1                  ; BUFFER = BUFFER + 1
       CMP   @A1,#100.            ; at the final count value?
       BNE   LOOP                 ; nope, get another value to display
       EXIT                       ; yup, back to the dot

BUFFER:BLKL  1                    ; MAP1 BUFFER,B,4
       END                        ; inform assembler end of source code