home *** CD-ROM | disk | FTP | other *** search
/ Serious Magazine 5 / Serious_Magazine_05_1999_Dial_pl_Side_B.atr / sstuff05.arc / LIZARD.ARC / GETPAR.MAE < prev    next >
Text File  |  1988-09-01  |  2KB  |  1 lines

  1. ; Get Parameter¢; for SpartaDOS & DOSII+/D¢¢; Returns:¢;C=1- neither DOS II+/D nor SDX¢;Z=1- no more parameters,¢;current disk set¢;   IfZ=0& C=0:¢;AX- pointer to parameter¢;Y- length of parameter¢¢Getparjmp?init¢¢; DOS II+/D¢¢?dos2dlda$13c3; get¢sta?cur+1; current disk¢¢ldy#$ff; look for¢?nxtiny; next parameter¢lda$1b03,y¢cmp#$9b¢beq?nfn; no parameter¢cmp#$20¢bne?nxt¢¢?sspiny; skip spaces¢cmp$1b03,y¢beq?ssp¢¢php; Z=0, parameter¢¢jsr$14b9; shift line¢lda$1b00¢cmp#'M¢bne?p2b¢lda#'D        ; change M:¢sta$1b00; to D8:¢lda#'8¢sta$1b01¢¢?p2bldy#$ff; copy parameter¢?cpiny; to buffer¢lda$1b00,y¢sta?param,y¢cmp#$9b¢beq?ext¢cmp#$20¢bne?cp¢¢?eollda#$9b; put EOL¢sta?param,y; at the end¢bne?ext¢¢?nfnphp; parameter¢ldy#$00; not found¢?ccrlda?cur,y; set current¢sta?param,y; disk¢iny¢cpy#$03¢bcc?ccr¢¢?extlda#<?param; return¢ldx#>?param; pointer¢¢?exitplp; restore¢clc; parameter flag¢rts; and exit¢¢?cur.by"D :"      ; current disk¢¢?param=*; buffer¢¢; SpartaDOS¢¢?spdosclc; is next?¢ldy#$0a¢lda($0a),y¢adc#$3f¢tay¢lda($0a),y¢cmp#$9b¢php; Z=0, parameter¢¢?jspjsr0; get parameter¢txa; move length¢tay; from X to Y¢?lolda#$00; return¢?hildx#$00; pointer¢bne?exit; exit¢¢; General init¢¢?initlda$0700; what DOS?¢asl¢cmp#'S*2¢beq?sdx; Sparta¢cmp#'D*2¢beq?d2p; II+/D¢sec; none of them¢rts¢¢?sdxldy#$04; SpartaDOS¢lda($0a),y; get address¢sta?jsp+1; of getting¢iny; parameters¢lda($0a),y; procedure¢sta?jsp+2¢¢lda$0a; compute buffer¢adc#$20; address¢sta?lo+1¢lda$0b¢adc#$00¢sta?hi+1¢lda#<?spdos; initialize¢ldx#>?spdos; jump address¢bne?std¢¢?d2pldy$0348; DOS II+/D¢; get length of¢; command line¢¢lda$1b02,y; look for end¢ldx#$ff; of command¢?fendey; line¢inx¢cmp?ex,x¢bne?fen¢¢lda#$9b; put EOL there¢sta$1b03,y¢lda#<?dos2d; initialize¢ldx#>?dos2d; jump address¢¢?stdstagetpar+1; set jump¢stxgetpar+2¢jmpgetpar; jump¢¢?ex.by".COM"¢