Changeset 7258c6a in buchla-68k for ram/etloc.c
- Timestamp:
- 07/09/2017 04:45:34 PM (7 years ago)
- Branches:
- master
- Children:
- 8618599
- Parents:
- 0292fbb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ram/etloc.c
r0292fbb r7258c6a 20 20 #include "instdsp.h" 21 21 22 extern u nsigned setsr(unsignedsr);23 24 extern u nsigned*obj8;25 26 extern u nsignedcurintp;27 28 extern short ctrsw;29 extern short timemlt;30 extern short recsw;31 extern short stccol;32 33 extern short grploc[];34 extern short grpmode[];35 extern short grpstat[];36 extern short loctab[];37 extern short vce2grp[];38 39 extern short expbit[];22 extern uint16_t setsr(uint16_t sr); 23 24 extern uint16_t *obj8; 25 26 extern uint16_t curintp; 27 28 extern int16_t ctrsw; 29 extern int16_t timemlt; 30 extern int16_t recsw; 31 extern int16_t stccol; 32 33 extern int16_t grploc[]; 34 extern int16_t grpmode[]; 35 extern int16_t grpstat[]; 36 extern int16_t loctab[]; 37 extern int16_t vce2grp[]; 38 39 extern int16_t expbit[]; 40 40 41 41 extern struct gdsel *gdstbc[]; … … 53 53 */ 54 54 55 short et_loc(short n)55 int16_t et_loc(int16_t n) 56 56 { 57 57 ebuf[0] =grploc[n] + 1 + '0'; … … 71 71 */ 72 72 73 void setloc( short grp, short loc)74 { 75 register short g, i, val;76 register longltmp;77 register u nsigned*fpu;73 void setloc(int16_t grp, int16_t loc) 74 { 75 register int16_t g, i, val; 76 register int32_t ltmp; 77 register uint16_t *fpu; 78 78 register struct idfnhdr *fp; 79 u nsignedfpmant, fpexp;80 short oldsr;81 short nop;79 uint16_t fpmant, fpexp; 80 int16_t oldsr; 81 int16_t nop; 82 82 83 83 grploc[grp] = loc; … … 85 85 g = grp + 1; 86 86 87 fpmant = ((( long)curintp & 0x0000FFF0L) *88 (( long)timemlt & 0x0000FFFFL)) >> 15;87 fpmant = (((int32_t)curintp & 0x0000FFF0L) * 88 ((int32_t)timemlt & 0x0000FFFFL)) >> 15; 89 89 90 90 fpexp = expbit[curintp & 0x000F]; … … 105 105 fp->idftmd ^= I_NVBITS; 106 106 107 *(fpu + ( long)FPU_TMNT) = fpmant;107 *(fpu + (int32_t)FPU_TMNT) = fpmant; 108 108 ++nop; ++nop; ++nop; 109 *(fpu + ( long)FPU_TEXP) = fpexp;109 *(fpu + (int32_t)FPU_TEXP) = fpexp; 110 110 ++nop; ++nop; ++nop; 111 111 112 112 if (fp->idftmd & I_VNSUBN) 113 *(fpu + ( long)FPU_TNV1) = val;113 *(fpu + (int32_t)FPU_TNV1) = val; 114 114 else 115 *(fpu + ( long)FPU_TNV0) = val;115 *(fpu + (int32_t)FPU_TNV0) = val; 116 116 117 117 ++nop; ++nop; ++nop; 118 118 119 *(fpu + ( long)FPU_TCTL) =119 *(fpu + (int32_t)FPU_TCTL) = 120 120 (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0001; 121 121 … … 137 137 */ 138 138 139 short ef_loc(short n)140 { 141 register short ival;139 int16_t ef_loc(int16_t n) 140 { 141 register int16_t ival; 142 142 register struct s_entry *ep; 143 143 … … 186 186 */ 187 187 188 short rd_loc(short n)188 int16_t rd_loc(int16_t n) 189 189 { 190 190 if (v_regs[5] & 0x0180) … … 204 204 void ds_loc(void) 205 205 { 206 register short i;206 register int16_t i; 207 207 208 208 for (i = 0; i < 12; i++) … … 220 220 */ 221 221 222 short nd_loc(short n, short k)222 int16_t nd_loc(int16_t n, int16_t k) 223 223 { 224 224 ebuf[0] = k + '0';
Note:
See TracChangeset
for help on using the changeset viewer.