1: / 2: / 3: 4: / r7 -- fortran runtime 5: 6: achk = 1 / 1 to check array bounds 7: .globl lvalp 8: .globl rval1p 9: .globl rval2p 10: .globl rval4p 11: .globl rval8p 12: .globl alval 13: .globl alvalp 14: .globl arval 15: .globl arvalp 16: 17: .globl rerr 18: 19: lvalp: 20: mov r3,r0 21: add (r4)+,r0 22: mov (r0)+,-(sp) 23: jmp *(r4)+ 24: 25: rval1p: 26: mov r3,r0 27: add (r4)+,r0 28: movb *(r0)+,-(sp) 29: jmp *(r4)+ 30: 31: rval2p: 32: mov r3,r0 33: add (r4)+,r0 34: mov *(r0)+,-(sp) 35: jmp *(r4)+ 36: 37: rval4p: 38: mov r3,r0 39: add (r4)+,r0 40: mov (r0),r0 41: cmp (r0)+,(r0)+ 42: mov -(r0),-(sp) 43: mov -(r0),-(sp) 44: jmp *(r4)+ 45: 46: rval8p: 47: setd 48: mov r3,r0 49: add (r4)+,r0 50: movf *(r0)+,fr0 51: movf fr0,-(sp) 52: jmp *(r4)+ 53: 54: alval: 55: jsr r5,getsub; 1 56: mov (r4)+,-(sp) 57: add r1,(sp) 58: jmp *(r4)+ 59: 60: arvalp: 61: jsr r5,getsub; 0 62: mov r3,r2 63: add (r4)+,r2 64: mov (r2),r2 65: br 1f 66: 67: arval: 68: jsr r5,getsub; 1 69: mov (r4)+,r2 70: 1: 71: add r2,r1 72: mov -(r0),r2 73: asr r2 74: bcc 1f 75: movb (r1),-(sp) 76: jmp *(r4)+ 77: 1: 78: add (r0),r1 79: 1: 80: mov -(r1),-(sp) 81: sob r2,1b 82: jmp *(r4)+ 83: 84: getsub: 85: tst (sp)+ 86: mov (r4)+,r0 87: mov (r0)+,r2 88: clr r1 89: tst (r0)+ 90: 1: 91: tst (sp)+ 92: dec (sp) 93: add (sp)+,r1 94: mpy (r0)+,r1 95: sob r2,1b 96: 97: tst (r5)+ 98: beq 2f 99: mov r1,-(sp) 100: mov -2(r4),r0 101: mov (r0)+,r2 102: inc r2 103: mov $1,r1 104: 1: 105: mpy (r0)+,r1 106: sob r2,1b 107: .if achk 108: cmp r1,(sp) 109: bhi 1f 110: jsr r5,rerr; 15. 111: .endif 112: 1: 113: mov (sp)+,r1 114: 115: 2: 116: jmp (r5) 117: 118: alvalp: 119: jsr r5,getsub; 0 120: mov r3,r0 121: add (r4)+,r0 122: mov (r0),-(sp) 123: add r1,(sp) 124: jmp *(r4)+