1: /
   2: /
   3: 
   4: / io6 --  input conversions
   5: 
   6: /.globl	aicv
   7: /.globl	gicv
   8: /
   9: /.globl	ilval
  10: /.globl	width
  11: /.globl	ilen
  12: /.globl	fgetc
  13: /.globl	itype
  14: /.globl	nlflg
  15: /.globl	gcflg
  16: 
  17: aicv:
  18:         mov     ilval,r1
  19:         movb    width,r2
  20:         movb    ilen,r0
  21:         mov     r0,-(sp)
  22: 1:
  23:         cmp     r2,(sp)
  24:         ble     1f
  25:         jsr     r5,fgetc
  26:         dec     r2
  27:         br      1b
  28: 1:
  29:         tst     r2
  30:         ble     1f
  31:         jsr     r5,fgetc
  32:         movb    r0,(r1)+
  33:         dec     r2
  34:         dec     (sp)
  35:         br      1b
  36: 1:
  37:         tst     (sp)
  38:         ble     1f
  39:         movb    $' ,(r1)+
  40:         dec     (sp)
  41:         br      1b
  42: 1:
  43:         tst     (sp)+
  44:         rts     r5
  45: 
  46: licv:
  47:         mov     width,twidth
  48:         setd
  49:         seti
  50:         clrf    fr0
  51: 1:
  52:         jsr     r5,fgetcn
  53:         cmp     r0,$'t
  54:         beq     2f
  55:         cmp     r0,$'T
  56:         beq     2f
  57:         cmp     r0,$'1
  58:         beq     2f
  59:         cmp     r0,$',
  60:         beq     1f
  61:         br      1b
  62: 2:
  63:         movif   $1,fr0
  64:         br      1b
  65: 1:
  66:         br      storin
  67: 
  68: iicv:
  69:         clr     ndig
  70: 
  71: ficv:
  72: eicv:
  73: dicv:
  74:         mov     width,twidth
  75:         br      1f
  76: 
  77: gicv:
  78:         mov     $16383.,twidth
  79:         clr     ndig
  80:         mov     pc,gcflg
  81:         br      2f
  82: 1:
  83:         clr     gcflg
  84: 2:
  85:         jsr     r5,gatof
  86: storin:
  87:         cmpb    itype,$'r
  88:         beq     1f
  89:         cmpb    ilen,$1
  90:         beq     3f
  91:         cmpb    ilen,$4
  92:         bne     2f
  93:         setl
  94: 2:
  95:         movfi   fr0,*ilval
  96:         rts     r5
  97: 3:
  98:         movfi   fr0,r0
  99:         movb    r0,*ilval
 100:         rts     r5
 101: 1:
 102:         cmpb    ilen,$8.
 103:         beq     2f
 104:         setf
 105: 2:
 106:         movf    fr0,*ilval
 107:         rts     r5
 108: 
 109: gatof:
 110:         setd
 111:         seti
 112:         movif   $10.,fr3
 113:         clr     r2
 114:         clrf    fr0
 115:         clr     -(sp)
 116: 1:
 117:         jsr     r5,fgetcn
 118:         cmp     $' ,r0
 119:         bne     1f
 120:         tst     nlflg
 121:         beq     1b
 122:         tst     (sp)+
 123:         rts     r5
 124: 1:
 125:         cmp     r0,$'+
 126:         beq     1f
 127:         cmp     r0,$'-
 128:         bne     2f
 129:         inc     (sp)
 130: 1:
 131:         jsr     r5,fgetcn
 132: 2:
 133:         cmp     $' ,r0
 134:         bne     3f
 135:         tst     gcflg
 136:         bne     3f
 137:         mov     $'0,r0
 138: 3:
 139:         sub     $'0,r0
 140:         cmp     r0,$9.
 141:         bhi     2f
 142:         mulf    fr3,fr0
 143:         movif   r0,fr1
 144:         addf    fr1,fr0
 145:         dec     r1
 146:         br      1b
 147: 2:
 148:         add     $'0,r0
 149:         cmp     r0,$'.
 150:         bne     1f
 151:         inc     r2
 152:         clr     r1
 153:         br      1b
 154: 1:
 155:         mov     r3,-(sp)
 156:         clr     r3
 157:         cmp     r0,$'d
 158:         beq     3f
 159:         cmp     r0,$'+
 160:         beq     3f
 161:         cmp     r0,$'-
 162:         beq     3f
 163:         cmp     r0,$'e
 164:         bne     2f
 165: 3:
 166:         jsr     r5,atoi
 167: 2:
 168:         tst     r2
 169:         bne     1f
 170:         mov     ndig,r1
 171:         neg     r1
 172: 1:
 173:         movf    fr3,fr2
 174:         add     r3,r1
 175:         mov     (sp)+,r3
 176:         tst     r1
 177:         beq     1f
 178:         bpl     3f
 179:         neg     r1
 180:         mov     pc,-(sp)
 181:         br      2f
 182: 3:
 183:         clr     -(sp)
 184: 2:
 185:         dec     r1
 186:         ble     2f
 187:         mulf    fr3,fr2
 188:         br      2b
 189: 2:
 190:         tst     (sp)+
 191:         bne     2f
 192:         mulf    fr2,fr0
 193:         br      1f
 194: 2:
 195:         divf    fr2,fr0
 196: 1:
 197:         tst     (sp)+
 198:         beq     1f
 199:         negf    r0
 200: 1:
 201:         cmp     r0,$',
 202:         beq     1f
 203:         cmp     $' ,r0
 204:         beq     1f
 205:         jsr     r5,rerr; 110.
 206: 1:
 207:         rts     r5
 208: 
 209: atoi:
 210:         clr     -(sp)
 211:         cmp     r0,$'+
 212:         beq     1f
 213:         cmp     r0,$'-
 214:         beq     3f
 215:         jsr     r5,fgetcn
 216:         cmp     r0,$'+
 217:         beq     1f
 218:         cmp     r0,$'-
 219:         bne     2f
 220: 3:
 221:         inc     (sp)
 222: 1:
 223:         jsr     r5,fgetcn
 224: 2:
 225:         sub     $'0,r0
 226:         cmp     r0,$'9.
 227:         bhi     2f
 228:         mpy     $10.,r3
 229:         add     r0,r3
 230:         br      1b
 231: 2:
 232:         add     $'0,r0
 233:         tst     (sp)+
 234:         beq     1f
 235:         neg     r3
 236: 1:
 237:         rts     r5
 238: 
 239: fgetcn:
 240:         tst     twidth
 241:         bgt     1f
 242:         mov     $',,r0
 243:         rts     r5
 244: 1:
 245:         jsr     r5,fgetc
 246:         dec     twidth
 247:         rts     r5

Defined functions

aicv defined in line 17; never used
atoi defined in line 209; used 1 times
dicv defined in line 73; never used
eicv defined in line 72; never used
fgetcn defined in line 239; used 5 times
ficv defined in line 71; never used
gatof defined in line 109; used 1 times
  • in line 85
gicv defined in line 77; never used
iicv defined in line 68; never used
licv defined in line 46; never used
storin defined in line 86; used 1 times
  • in line 66
Last modified: 1975-07-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 362
Valid CSS Valid XHTML 1.0 Strict