Annotation of researchv9/cmd/adb/68v/mchio.c, revision 1.1.1.1

1.1       root        1: /*
                      2:  * read or print machine-dependent data structures
                      3:  * stupid version, for vax debugging 68000
                      4:  */
                      5: 
                      6: #include "defs.h"
                      7: 
                      8: /*
                      9:  * read an ASCII expression
                     10:  */
                     11: 
                     12: char lastc;
                     13: 
                     14: WORD
                     15: ascval()
                     16: {
                     17:        TLONG l;
                     18:        register char *p;
                     19:        register int i;
                     20: 
                     21:        l = 0;
                     22:        p = (char *)&l;
                     23:        i = sizeof(l);
                     24:        while (quotchar()) {
                     25:                if (--i >= 0)
                     26:                        *p++ = lastc;
                     27:        }
                     28:        switch (i) {
                     29:        case 4:
                     30:                return (0);
                     31: 
                     32:        case 3:
                     33:                return (l);     /* just the char */
                     34: 
                     35:        case 2:
                     36:                return ((WORD)swab((TSHORT)l));
                     37: 
                     38:        default:
                     39:                return ((WORD)swal(l));
                     40:        }
                     41: }
                     42: 
                     43: /*
                     44:  * read a floating point number in VAX format
                     45:  * the result must fit in a WORD
                     46:  */
                     47: 
                     48: WORD
                     49: fpin(buf)
                     50: char *buf;
                     51: {
                     52:        error("no fp input");
                     53: }
                     54: 
                     55: /*
                     56:  * print a floating point number in VAX format
                     57:  */
                     58: 
                     59: fpout(flag, va)
                     60: char flag;
                     61: char *va;
                     62: {
                     63:        error("no fp output");
                     64: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.