.title XEDT Callable EDT with SPAWN .library "MACROS" setup $MSGDEF $IODEF $TTDEF $TT2DEF $DCDEF .psect edt_data, long,noshr,noexe,wrt ; ; Parameters to pass to EDT$EDIT ; infile: descriptor ,,,D ; Input file name outfile: descriptor ,,,D ; Output file name command: descriptor ,,,D ; Command file name journal: descriptor ,,,D ; Journal file name options: .long 0 ; Options longword ; ; CLI entities ; cli_input: .ascid "INPUT" cli_output: .ascid "OUTPUT" cli_command: .ascid "COMMAND" cli_journal: .ascid "JOURNAL" cli_read_only: .ascid "READ_ONLY" cli_recover: .ascid "RECOVER" cli_create: .ascid "CREATE" ; ; Hooks to XLATE and FILEIO procedures ; xlate: .long xedt_xlate .long 0 fileio: .long 0 .long 0 ; ; Mailbox stuff. ; cmd_mbx_lnm: .ascid "XEDT_CMD_MBX" out_mbx_lnm: .ascid "XEDT_OUT_MBX" cmd_mbx: .word 0 out_mbx: .word 0 iosb: .blkw 4 owner_only: .long ^XFF00 one: .long 1 ; ; GETJPI stuff to find command file to run ; getjpi_itmlst: item JPI$_IMAGNAME, 256, image_name, image_name_d item 0,0,0 subproc_cmd: .ascii "@" image_name: .blkb 256 subproc_cmd_d: descriptor subproc_cmd image_name_d: descriptor image_name dotexe: .ascid ".EXE" ; ; Change directory stuff ; sys$disk: .ascid "SYS$DISK" .align long cdfab: $FAB nam=cdnam cdnam: $NAM esa=cdesa, ess=255 cdmsg: .ascii "\CD " cdesa: .blkb 256 ; ; Exit handler stuff. ; desblk: .blkl .long exit_handler .long 1 .long 1$ 1$: .blkl ; ; FILEIO stuff ; fileio_lnm: .ascid "XEDT_FILEIO" fileio_table: .ascid "LNM$FILE_DEV" .align long fileio_stuff: fileio_cmd_fab: $FAB fac=, fop=, nam=fileio_cmd_nam fileio_cmd_rab: $RAB fab=fileio_cmd_fab, ubf=fileio_ubf, usz=8192, rop= fileio_cmd_nam: $NAM esa=fileio_esa, ess=255, rsa=fileio_rsa, rss=255 fileio_cmd_d: descriptor ,,T,D fileio_inp_fab: $FAB shr=, fac=, fop=, - nam=fileio_inp_nam fileio_inp_rab: $RAB fab=fileio_inp_fab, ubf=fileio_ubf, usz=8192, - rhb=fileio_rhb, rop=, mbc=64 fileio_inp_nam: $NAM rsa=fileio_inp_rsa, rss=255, esa=fileio_inp_esa, ess=255 fileio_inp_esa: .blkb 256 fileio_inp_rsa: .blkb 256 fileio_inp_d: descriptor ,,T,D fileio_inc_fab: $FAB shr=, fac=, fop=, - nam=fileio_inc_nam fileio_inc_rab: $RAB fab=fileio_inc_fab, ubf=fileio_ubf, usz=8192, - rop=, mbc=32 fileio_inc_nam: $NAM rlf=fileio_inp_nam, esa=fileio_esa, ess=255, - rsa=fileio_rsa, rss=255 fileio_inc_d: descriptor ,,T,D fileio_jou_fab: $FAB shr=, fac=, fop=, - nam=fileio_jou_nam fileio_jou_rab: $RAB fab=fileio_jou_fab, rop= fileio_jou_nam: $NAM rlf=fileio_inp_nam, esa=fileio_esa, ess=255, - rsa=fileio_rsa, rss=255 fileio_jou_d: descriptor ,,T,D fileio_out_fab: $FAB fac=, nam=fileio_out_nam, fop= fileio_out_rab: $RAB fab=fileio_out_fab, rop=, mbc=64 fileio_out_nam: $NAM rlf=fileio_inp_nam, esa=fileio_esa, ess=255, - rsa=fileio_rsa, rss=255 fileio_out_d: descriptor ,,T,D fileio_wrt_fab: $FAB fac=, fop=, nam=fileio_wrt_nam fileio_wrt_rab: $RAB fab=fileio_wrt_fab, rop=, mbc=32 fileio_wrt_nam: $NAM esa=fileio_esa, ess=255, rsa=fileio_rsa, rss=255 fileio_wrt_d: descriptor ,,T,D fileio_rhb: .blkb 256 fileio_ubf: .blkb 8192 fileio_esa: .blkb 256 fileio_rsa: .blkb 256 fileio_lkwset: .long fileio_stuff .long . ; ; Broadcast trapping stuff ; esc = 27 bt_bufquo: .long 2048 bt_maxmsg: .long 256 bt_mbxchan: .word 0 bt_ttychan: .word 0 bt_terminal: .ascid "SYS$COMMAND:" bt_iosb: .blkw 4 bt_iobuf: .blkb 256 bt_chars: .blkl 3 bt_save_chars: .blkl 3 bt_msg_buf: descriptor 1$, 256 1$: .blkb 256 bt_lm_fao: .ascid "!/!AD" bt_sm_fao_23: .ascid "7""[23H""[m""[J!AD""8" bt_sm_fao_24: .ascid "7""[24H""[m""[K!AD""8" bt_dvi_itmlst: item DVI$_DEVCLASS, 4, bt_devclass .long 0 bt_devclass: .blkl ; ; Misc. ; scratch_d: .ascid "" dcl_return_cmd: .ascid "() EXT INCLUDE XEDT_OUT_MBX: ; CHANGE;" refresh_screen: .ascid "REF" reset_term: .ascid "[r""[23H""[m""[4l"">" null_string: .ascid "" all_privs: .long -1 .long -1 .psect xedt_code, long,shr,exe,nowrt .entry xedt, ^M<> ; ; Determine whether XEDT's I/O should be used ; moval g^EDT$FILEIO, fileio $TRNLNM_S tabnam=fileio_table, lognam=fileio_lnm cmpl R0, #SS$_NOLOGNAM beql 12$ ; ; Using XEDT's FILEIO module -- enable. ; Lock I/O buffers into memory, crank out working set. ; movab xedt_fileio, fileio $LKWSET_S inadr=fileio_lkwset status R0 $ADJWSL_S pagcnt=#3000 ; ; Get name of image and convert to command file name. ; 12$: $GETJPIW_S itmlst=getjpi_itmlst, iosb=iosb status R0 status iosb call STR$POSITION, image_name_d, dotexe movl #^A".COM", image_name-1(R0) addw3 #4, R0, subproc_cmd_d ; ; Get input file from command line ; call CLI$GET_VALUE, cli_input, infile ; ; Check for /OUTPUT ; call CLI$PRESENT, cli_output cmpl R0, #CLI$_PRESENT bneq 10$ call CLI$GET_VALUE, cli_output, outfile brb 11$ 10$: cmpl R0, #CLI$_NEGATED bneq 11$ bisl2 #EDT$M_NOOUTPUT, options 11$: ; ; Check for /READ_ONLY (should override /OUTPUT) ; call CLI$PRESENT, cli_read_only cmpl R0, #CLI$_PRESENT bneq 20$ bisl2 #EDT$M_NOOUTPUT, options 20$: ; ; Check for /COMMAND ; call CLI$PRESENT, cli_command cmpl R0, #CLI$_PRESENT bneq 30$ call CLI$GET_VALUE, cli_command, command bisl2 #EDT$M_COMMAND, options brb 31$ 30$: cmpl R0, #CLI$_NEGATED bneq 31$ bisl2 #EDT$M_NOCOMMAND, options 31$: ; ; Check for /JOURNAL ; call CLI$PRESENT, cli_journal cmpl R0, #CLI$_PRESENT bneq 40$ call CLI$GET_VALUE, cli_journal, journal brb 41$ 40$: cmpl R0, #CLI$_NEGATED bneq 41$ bisl2 #EDT$M_NOJOURNAL, options 41$: ; ; Check for /RECOVER ; call CLI$PRESENT, cli_recover cmpl R0, #CLI$_PRESENT bneq 50$ bisl2 #EDT$M_RECOVER, options 50$: ; ; Check for /NOCREATE ; call CLI$PRESENT, cli_create cmpl R0, #CLI$_NEGATED bneq 60$ bisl2 #EDT$M_NOCREATE, options 60$: ; ; Establish exit handler ; $DCLEXH_S desblk status R0 ; ; Kick off EDT. ; call bt_trap_on call EDT$EDIT, infile, outfile, command, journal, - options, fileio, 0, xlate status R0 ret ; ; Exit handler -- cleans up subprocess stuff. ; .entry exit_handler, ^M<> tstw cmd_mbx beql 99$ $QIOW_S, chan=cmd_mbx, func=#IO$_WRITEOF $DASSGN_S cmd_mbx $DASSGN_S out_mbx 99$: call bt_trap_off movl @4(AP), R0 ret ; ; XLATE routine -- allow DCL commands etc ; .entry xedt_xlate, ^M<> movq @4(AP), scratch_d subw2 #2, scratch_d addl2 #2, scratch_d+4 movaq @4(AP), R0 cmpw (R0), #2 blss funny cmpw @4(R0), #^A"$$" ; $$ = DCL command beql 91$ cmpw @4(R0), #^A"$%" ; $% = DCL command sans include bneq 1$ 91$: brw dcl_command 1$: cmpw @4(R0), #^A"SP" ; SP = SPAWN bneq 2$ brw spawn_dcl 2$: cmpw @4(R0), #^A"CD" ; CD = Change directory bneq 3$ brw change_dir 3$: cmpw @4(R0), #^A"PR" ; PR = Enable privileges bneq 4$ brw enable_privs 4$: funny: call EDT$XLATE, @4(AP) ret ; ; "PR" -- Enable privileges ; enable_privs: call LIB$SCOPY_DXDX, null_string, @4(AP) $SETPRV_S enbflg=#1, prvadr=all_privs ret ; ; "CD" -- Change directory ; change_dir: movl scratch_d+4, cdfab+FAB$L_FNA cvtwb scratch_d, cdfab+FAB$B_FNS $PARSE cdfab blbs R0, 1$ ret 1$: movl cdnam+NAM$L_DEV, scratch_d+4 movzbw cdnam+NAM$B_DEV, scratch_d call LIB$SET_LOGICAL, sys$disk, scratch_d blbs R0, 2$ ret 2$: movl cdnam+NAM$L_DIR, scratch_d+4 movzbw cdnam+NAM$B_DIR, scratch_d call SYS$SETDDIR scratch_d, 0, 0 blbs R0, 3$ ret 3$: tstw cmd_mbx beql 4$ subl3 #cdmsg, cdnam+NAM$L_NAME, R0 $QIOW_S chan=cmd_mbx, iosb=iosb, func=#IO$_WRITEVBLK, - p1=cdmsg, p2=R0 status R0 status iosb 4$: call LIB$SCOPY_DXDX, null_string, @4(AP) ret ; ; "SP" -- SPAWN to DCL. ; spawn_dcl: call bt_trap_off call LIB$PUT_OUTPUT, reset_term call LIB$SPAWN, scratch_d call bt_trap_on call LIB$SCOPY_DXDX, refresh_screen, @4(AP) ret ; ; "$$" -- DCL command execution, with I/O redirection ; dcl_command: ; ; Assign channels to mailboxes if not already done ; tstw cmd_mbx bneq 12$ $CREMBX_S chan=cmd_mbx, promsk=owner_only, lognam=cmd_mbx_lnm blbs R0, 10$ ret 10$: $CREMBX_S chan=out_mbx, promsk=owner_only, lognam=out_mbx_lnm blbs R0, 11$ ret 11$: ; ; Spawn XEDT command file ; call bt_trap_off call LIB$SPAWN, subproc_cmd_d, 0, 0, one blbs R0, 16$ ret 16$: call bt_trap_on 12$: ; ; Write command to DCL shell ; movzwl scratch_d, R0 $QIOW_S chan=cmd_mbx, func=#IO$_WRITEVBLK, iosb=iosb, - p1=@scratch_d+4, p2=R0 blbc R0, 13$ blbs iosb, 14$ movzwl iosb, R0 13$: ret 14$: ; ; Copy commands back to EDT session ; movaq @4(AP), R0 cmpw @4(R0), #^A"$%" beql 15$ call LIB$SCOPY_DXDX, dcl_return_cmd, @4(AP) ret 15$: call LIB$SCOPY_DXDX, null_string, @4(AP) ret ret ; ; FILEIO routine -- allow files to be read ; .entry xedt_fileio, ^M ; ; Get parameters into registers ; movl 4(AP), R6 ; R6 = code movl 8(AP), R7 ; R7 = stream movl 12(AP), R8 ; R8 = record movl 16(AP), R9 ; R9 = rhb ; ; Put FAB & RAB for appropriate stream in R10 and R11 respectively. ; cmpl (R7), #EDT$K_COMMAND_FILE bneq 1$ movl #fileio_cmd_fab, R10 movl #fileio_cmd_rab, R11 movl #fileio_cmd_d, R4 brw 9$ 1$: cmpl (R7), #EDT$K_INPUT_FILE bneq 2$ movl #fileio_inp_fab, R10 movl #fileio_inp_rab, R11 movl #fileio_inp_d, R4 brw 9$ 2$: cmpl (R7), #EDT$K_INCLUDE_FILE bneq 3$ movl #fileio_inc_fab, R10 movl #fileio_inc_rab, R11 movl #fileio_inc_d, R4 brw 9$ 3$: cmpl (R7), #EDT$K_JOURNAL_FILE bneq 4$ movl #fileio_jou_fab, R10 movl #fileio_jou_rab, R11 movl #fileio_jou_d, R4 brw 9$ 4$: cmpl (R7), #EDT$K_OUTPUT_FILE bneq 5$ movl #fileio_out_fab, R10 movl #fileio_out_rab, R11 movl #fileio_out_d, R4 brw 9$ 5$: cmpl (R7), #EDT$K_WRITE_FILE bneq 6$ movl #fileio_wrt_fab, R10 movl #fileio_wrt_rab, R11 movl #fileio_wrt_d, R4 brw 9$ 6$: movl #SS$_ABORT, R0 ret ; ; Dispatch to appropriate I/O routine. ; 9$: cmpl (R6), #EDT$K_OPEN_INPUT beqlw fio_open_in cmpl (R6), #EDT$K_OPEN_OUTPUT_SEQ beqlw fio_open_out_s cmpl (R6), #EDT$K_OPEN_OUTPUT_NOSEQ beqlw fio_open_out_n cmpl (R6), #EDT$K_OPEN_IN_OUT beqlw fio_open_inout cmpl (R6), #EDT$K_GET beqlw fio_get cmpl (R6), #EDT$K_PUT beqlw fio_put cmpl (R6), #EDT$K_CLOSE beqlw fio_close cmpl (R6), #EDT$K_CLOSE_DEL beqlw fio_close_del movl #SS$_ABORT, R0 ret ; ; Open file for input/input&output (cmd, inp, inc, jou) ; fio_open_inout: fio_open_in: movl #SHR$_OPENIN, R5 jsb fio_parse_file $OPEN (R10) blbs R0, 1$ cmpl (R7), #EDT$K_INPUT_FILE bneq 3$ movb #FAB$C_VAR, FAB$B_RFM(R10) movb #FAB$M_CR, FAB$B_RAT(R10) movl fileio_inp_nam+NAM$L_ESA, fileio_inp_nam+NAM$L_RSA movb fileio_inp_nam+NAM$B_ESL, fileio_inp_nam+NAM$B_RSL 3$: brw fileio_sig_fab 1$: cmpb FAB$B_RFM(R10), #FAB$C_VFC bneq 2$ bbc #FAB$V_PRN, FAB$B_RAT(R10), 2$ clrb FAB$B_FSZ(R10) 2$: brw fio_connect ; ; Open file for output with sequence numbers (out) ; fio_open_out_s: movw fileio_inp_fab+FAB$W_MRS, FAB$W_MRS(R10) movb #FAB$C_VFC, FAB$B_RFM(R10) movb #2, FAB$B_FSZ(R10) movb fileio_inp_fab+FAB$B_RAT, FAB$B_RAT(R10) bicl2 #FAB$M_PRN, FAB$B_RAT(R10) bisl2 #FAB$M_CR, FAB$B_RAT(R10) tstw (R8) bneq 1$ movaq fileio_inp_d, R9 1$: brw fio_open_out ; ; Open file for output without sequence numbers (out, wrt, jou) ; fio_open_out_n: clrb FAB$B_FSZ(R10) movb #FAB$C_VAR, FAB$B_RFM(R10) movb #FAB$M_CR, FAB$B_RAT(R10) cmpl (R7), #EDT$K_OUTPUT_FILE bneq 1$ tstw (R8) bneq 2$ movaq fileio_inp_d, R9 2$: movb fileio_inp_fab+FAB$B_RFM, FAB$B_RFM(R10) movb fileio_inp_fab+FAB$B_RAT, FAB$B_RAT(R10) movw fileio_inp_fab+FAB$W_MRS, FAB$W_MRS(R10) cmpb #FAB$C_VFC, FAB$B_RFM(R10) bneq fio_open_out bbc #FAB$V_PRN, FAB$B_RAT(R10), 1$ bicl2 #FAB$M_PRN, FAB$B_RAT(R10) bisl2 #FAB$M_CR, FAB$B_RAT(R10) movb #FAB$C_VAR, FAB$B_RFM(R10) 1$: ; ; Actually open the file.... ; fio_open_out: movl #SHR$_OPENOUT, R5 jsb fio_parse_file $CREATE (R10) blbs R0, fio_connect brw fileio_sig_fab fio_connect: $CONNECT (R11) blbs R0, 2$ brw fileio_sig_rab 2$: jsb save_rsa ret ; ; Get record from file (jou, inp, inc, cmd) ; fio_get: movl #SHR$_READERR, R5 movab fileio_ubf, RAB$L_UBF(R11) movw #8192, RAB$W_USZ(R11) movab fileio_rhb, RAB$L_RHB(R11) $GET (R11) cmpl R0, #RMS$_EOF bneq 1$ ret 1$: blbs R0, 2$ brw fileio_sig_rab 2$: movab fileio_ubf, scratch_d+4 movw RAB$W_RSZ(R11), scratch_d call LIB$SCOPY_DXDX, scratch_d, (R8) movab fileio_rhb, scratch_d+4 movzbw FAB$B_FSZ(R10), scratch_d call LIB$SCOPY_DXDX, scratch_d, (R9) 3$: ret ; ; Put a record to file (jou, out, wrt) ; fio_put: movl #SHR$_WRITEERR, R5 movab @4(R8), RAB$L_RBF(R11) movw (R8), RAB$W_RSZ(R11) movab @4(R9), RAB$L_RHB(R11) $PUT (R11) blbs R0, 1$ brw fileio_sig_rab 1$: ret ; ; Close file (cmd, inp, out, jou, wrt, inc) ; fio_close: movl #SHR$_CLOSEIN, R5 $CLOSE (R10) blbs R0, 1$ brw fileio_sig_fab 1$: ret ; ; Close file and delete (jou) ; fio_close_del: movl #SHR$_CLOSEDEL, R5 bisl2 #FAB$M_DLT, FAB$L_FOP(R10) $CLOSE (R10) blbs R0, 1$ brw fileio_sig_fab 1$: ret ; ; Parse filespec so correct file names are displayed in errors. ; fio_parse_file: call LIB$SCOPY_DXDX, (R8), (R4) movl 4(R8), FAB$L_FNA(R10) cvtwb (R8), FAB$B_FNS(R10) movl 4(R9), FAB$L_DNA(R10) cvtwb (R9), FAB$B_DNS(R10) $PARSE (R10) blbs R0, 1$ brw fileio_sig_fab 1$: movl FAB$L_NAM(R10), R0 movzbw NAM$B_ESL(R0), scratch_d movl NAM$L_ESA(R0), scratch_d+4 call LIB$SCOPY_DXDX, scratch_d, (R8) movl 4(R8), FAB$L_FNA(R10) cvtwb (R8), FAB$B_FNS(R10) movl R8, R4 rsb ; ; Save resultant filespec. ; save_rsa: movl FAB$L_NAM(R10), R0 movzbw NAM$B_RSL(R0), scratch_d movl NAM$L_RSA(R0), scratch_d+4 call LIB$SCOPY_DXDX, scratch_d, (R8) movl R8, R4 rsb ; ; Signal errors ; R4 = filespec, R5 = SHR$_xxxxxx condition code ; EDT$K_FAC_NO = 133 ; Not available in EDTSHR. fileio_sig_fab: addl2 #EDT$K_FAC_NO*65536+STS$K_SEVERE, R5 call LIB$SIGNAL, (R5), 1, (R4), @FAB$L_STS(R10), @FAB$L_STV(R10) ret fileio_sig_rab: addl2 #EDT$K_FAC_NO*65536+STS$K_SEVERE, R5 call LIB$SIGNAL, (R5), 1, (R4), @RAB$L_STS(R10), @RAB$L_STV(R10) ret ; ; Broadcast trapping routines ; ; ; BT_TRAP_ON -- Turn braodcast trapping on ; .entry bt_trap_on, ^M<> call LIB$ASN_WTH_MBX, bt_terminal, bt_maxmsg, bt_bufquo, - bt_ttychan, bt_mbxchan status R0 $GETDVIW_S chan=bt_ttychan, itmlst=bt_dvi_itmlst,iosb=bt_iosb status R0 status bt_iosb cmpl bt_devclass, #DC$_TERM beql 1$ $DASSGN_S chan=bt_ttychan $DASSGN_S chan=bt_mbxchan clrw bt_ttychan ret 1$: $QIOW_S chan=bt_ttychan, func=#IO$_SENSEMODE, iosb=bt_iosb, - p1=bt_chars, p2=#12 status R0 status bt_iosb movq bt_chars, bt_save_chars movl bt_chars+8, bt_save_chars+8 bisl2 #TT2$M_BRDCSTMBX, bt_chars+8 bisl2 #TT$M_NOBRDCST, bt_chars+4 $QIOW_S chan=bt_ttychan, func=#IO$_SETMODE, iosb=bt_iosb, - p1=bt_chars, p2=#12 status R0 status bt_iosb jsb bt_qio ret ; ; BT_TRAP_OFF -- Turn broadcast trapping off (for SPAWNs etc) ; .entry bt_trap_off, ^M<> tstw bt_ttychan bneq 1$ ret 1$: $CANCEL_S chan=bt_mbxchan status R0 $QIOW_S chan=bt_ttychan, func=#IO$_SETMODE, iosb=bt_iosb, - p1=bt_save_chars, p2=#12 status R0 status bt_iosb $DASSGN_S bt_ttychan status R0 $DASSGN_S bt_mbxchan status R0 clrw bt_ttychan ret ; ; QIO to resubmit read on terminal ; bt_qio: $QIO_S chan=bt_mbxchan, iosb=bt_iosb, func=#IO$_READVBLK, - astadr=bt_ast, p1=bt_iobuf, p2=#256 status R0 rsb ; ; AST routine to handle broadcasts ; .entry bt_ast, ^M ; ; Check if this is an abort, flag it if so. ; cmpw bt_iosb, #SS$_ABORT bneq 2$ movl #1, R0 ret ; ; If not a broadcast then just re-post the AST ; 2$: status bt_iosb cmpw bt_iobuf, #MSG$_TRMBRDCST bneqw 1$ ; ; Sort or buffer lengths ; movw #256, bt_msg_buf movzwl bt_iobuf+20, R2 ; ; Deep magic to determine whether EDT is in line or screen mode ; call magic tstb magic bneq 3$ ; ; If in line mode then just display message ; $FAO_S ctrstr=bt_lm_fao, outbuf=bt_msg_buf, outlen=bt_msg_buf,- p1=R2, p2=#bt_iobuf+22 status R0 movzwl bt_msg_buf, R0 $QIOW_S chan=bt_ttychan, iosb=bt_iosb, - func=#IO$_WRITEVBLK!IO$M_BREAKTHRU!IO$M_REFRESH, - p1=@bt_msg_buf+4, p2=R0 brw 4$ ; ; For screen mode... ; 3$: movab bt_iobuf+22, R3 ; ; ... strip leading CRs & LFs... ; 31$: cmpb (R3), #13 beql 32$ cmpb (R3), #10 bneq 33$ 32$: incl R3 decw R2 brb 31$ ; ; ... strip trailing CRs & LFs ... ; 33$: cmpb -1(R3)[R2], #13 beql 34$ cmpb -1(R3)[R2], #10 bneq 35$ 34$: decw R2 brb 33$ ; ; If string still contains a LF, then print message on line 23... ; 35$: locc #10, R2, (R3) beql 36$ movaq bt_sm_fao_23, R0 brb 37$ ; ; Else bung it on line 24 ; 36$: movaq bt_sm_fao_24, R0 ; ; Print the thing. ; 37$: $FAO_S ctrstr=(R0), outbuf=bt_msg_buf, outlen=bt_msg_buf,- p1=R2, p2=R3 status R0 movzwl bt_msg_buf, R0 $QIOW_S chan=bt_ttychan, iosb=bt_iosb, - func=#IO$_WRITEVBLK!IO$M_NOFORMAT!IO$M_BREAKTHRU, - p1=@bt_msg_buf+4, p2=R0 4$: status R0 status bt_iosb ; ; Post read back on mailbox for next one ; 1$: jsb bt_qio ret ; ; Magic stuff. ; .psect magic_stuff, long,wrt,exe,noshr magic: .long ^x7E7C0000, ^x7E7C7E7C, ^xEFDE7E7C, ^x0000001A .long ^xAEDE0CAE, ^x0014EF19, ^x07FB0000, ^xFEE4209F .long ^xE6AF8C7F, ^x6E1F8B6E, ^x0004D6AF, ^x00000318 .long ^x00000000, ^x00000000 .end xedt