* * This is a snippet of original 6809 assembler * code, before translation to Super 6502. * * * Code * ttl isrunnin * Entry point. Name pointer is at 2,S * Returns process ID or match in Reg-D * Start after PID #1 (system process) isrunnin: lda #1 sta _ir_pid,Y bra _irc_go * Start at current PID #1 pidscan: * Common code _irc_go: pshs u,y ldd #-64 lbsr _stkcheck * Main loop _irc_main: inc _ir_pid,y beq _irc_no ;Branch if no match lda _ir_pid,y leax _ir_pbuf,Y ;Get this proc's descriptor os9 F$GPrDsc bcs _irc_main * Compare names and quit on match ldx 6,S ;Recover pointer to caller's name bsr _irc_cmp bcc _irc_yes bra _irc_main * No match -- clean stack and return 0 _irc_err1: _irc_no: clra clrb puls Y,U,PC * Found a match -- clean stack and return the matching PID. _irc_yes: ldb _ir_pid,y clra puls Y,U,PC