|
|
1.1 ! root 1: /* ! 2: * Metheus library macros ! 3: */ ! 4: #define NMBUF 65536 ! 5: char mbuf[NMBUF], *mbufp; ! 6: int mfd; ! 7: char *omdev="/dev/null"; ! 8: char *getenv(); ! 9: #define msnare() \ ! 10: if((mfd=open(getenv("FB")?getenv("FB"):omdev, 2))<0) \ ! 11: perror(getenv("FB")?getenv("FB"):omdev), exit(1); \ ! 12: else write(mfd, mbuf, NMBUF), mbufp=mbuf ! 13: #define mlong(a) (mword((a)>>16), mword(a)) ! 14: #define mword(a) (mbyte((a)>>8), mbyte(a)) ! 15: #define mbyte(a) (mbufp==&mbuf[NMBUF]?(mflush(),*mbufp++=a):(*mbufp++=a)) ! 16: /* versions of the above allowing moving checks out of the loop */ ! 17: #define mcheck(n) (mbufp>=&mbuf[NMBUF-n]?mflush():0) ! 18: #define mulong(a) (muword((a)>>16), muword(a)) ! 19: #define muword(a) (mubyte((a)>>8), mubyte(a)) ! 20: #define mubyte(a) (*mbufp++=a) ! 21: #define mcmd(a) ((mbufp-mbuf)&1?(mbyte(0),mword(a)):mword(a)) ! 22: #define mflush() (((mbufp-mbuf)&1?(*mbufp++=0):0),write(mfd, mbuf, (mbufp-mbuf)*sizeof mbuf[0]),mbufp=mbuf) ! 23: /* ! 24: * Metheus Omega 3610 (and other 3000 series) opcode manifests ! 25: */ ! 26: /* arguments w: word, b: byte, l:long*/ ! 27: #define AFILL1 0x0068 /* */ ! 28: #define AFILL2 0x0069 /* w:edge value */ ! 29: #define AFILL3 0x0074 /* */ ! 30: #define ARC 0x0062 /* w:length */ ! 31: #define BLANK 0x004b /* b:mode */ ! 32: #define CARC 0x2000 /* w:cx, w:cy, w:sx, w:sy, w:angle */ ! 33: #define CHARS 0x006b /* b*:character, b:esc */ ! 34: #define CIRCLE 0x2001 /* w:cx, w:cy, w:radius */ ! 35: #define CLEAR 0x0060 /* */ ! 36: #define CMACT 0x3000 /* */ ! 37: #define CMAP 0x0051 /* b:index, b:red, b:grn, b:blu */ ! 38: #define CMAPOL 0x301a /* 8b:2 nibble-sized entries */ ! 39: #define CMBLNK 0x3019 /* w:count, ... */ ! 40: #define CMCOPY 0x3016 /* b:source, b:dest, w:srcindex, w:dstindex, w:count */ ! 41: #define CMFILL 0x3017 /* w:index, w:count, b:red, b:grn, b:blu */ ! 42: #define CMLDM 0x3013 /* w:index, w:count, b:red, b:grn, b:blu, ... */ ! 43: #define CMLOAD 0x3012 /* w:index, b:red, b:grn, b:blu */ ! 44: #define CMRAMP 0x3018 /* w:index, w:count, b:r0, b:g0, b:b0, b:r1, b:g1, b:b1 */ ! 45: #define CMSEL 0x3015 /* b:buff */ ! 46: #define CMWREN 0x3011 /* b:mask */ ! 47: #define COMPDR 0x0072 /* */ ! 48: #define CSPACE 0x0048 /* b:dx, b:dy */ ! 49: #define CURS 0x0071 /* */ ! 50: #define DFAULT 0x003f /* b:reset */ ! 51: #define DRAW 0x0061 /* */ ! 52: #define DRAWAL 0x3052 /* */ ! 53: #define DRAWTA 0x0078 /* w:x, w:y */ ! 54: #define DRAWTL 0x0077 /* w:x, w:y */ ! 55: #define DRAWTS 0x0076 /* b:x, b:y */ ! 56: #define DRAWV 0x3050 /* */ ! 57: #define DRRCUR 0x200c /* b:index */ ! 58: #define FFILL 0x0065 /* */ ! 59: #define FNTINX 0x3040 /* b:type */ ! 60: #define INI 0x005e /* */ ! 61: #define INQ 0x0041 /* w:parameter */ ! 62: #define LDFNTX 0x3041 /* b:type, b:ESC, w:0, w:0, b:height, b:width, ... */ ! 63: #define LDPATX 0x3042 /* w:pattern, ... */ ! 64: #define LDRCUR 0x3045 /* b:index, ... */ ! 65: #define MINVEC 0x3051 /* w:length */ ! 66: #define MODEB 0x007e /* */ ! 67: #define MODEW 0x007f /* */ ! 68: #define MOVP1 0x0052 /* w:x, w:y */ ! 69: #define MOVP2 0x0053 /* w:x, w:y */ ! 70: #define NOP 0x0000 /* */ ! 71: #define PATRNX 0x3043 /* w:pattern */ ! 72: #define PIXBLT 0x0070 /* w:width, w:height, b:pattern */ ! 73: #define POLYC 0x0044 /* */ ! 74: #define POLYD 0x2200 /* + count */ /* w:x, w:y, ... */ ! 75: #define POLYF 0x0067 /* */ ! 76: #define POLYLN 0x2100 /* + count */ /* w:x, w:y, ... */ ! 77: #define POLYM 0x0045 /* w:x, w:y */ ! 78: #define POLYO 0x0066 /* */ ! 79: #define POLYS 0x0056 /* */ ! 80: #define POLYV 0x0057 /* w:x, w:y */ ! 81: #define PPAN 0x005b /* */ ! 82: #define RASTOP 0x0043 /* b:function, b:alu */ ! 83: #define RDCONF 0x005d /* */ ! 84: #define RDMSK 0x004c /* b:mask */ ! 85: #define RDMSKL 0x3025 /* l:mask */ ! 86: #define RDMSKS 0x3024 /* w:mask */ ! 87: #define RDR 0x006e /* */ ! 88: #define RDRS 0x3035 /* */ ! 89: #define RECT1 0x0063 /* */ ! 90: #define RECT2 0x0064 /* */ ! 91: #define RESTOR 0x0037 /* */ ! 92: #define RLFILL 0x006a /* w:runlength */ ! 93: #define RMOVP1 0x0054 /* w:x, w:y */ ! 94: #define RMOVP2 0x0055 /* w:x, w:y */ ! 95: #define RMVP1S 0x0033 /* b:x, b:y */ ! 96: #define RMVP2S 0x0034 /* b:x, b:y */ ! 97: #define RPIXEL 0x006c /* */ ! 98: #define SAVE 0x0036 /* */ ! 99: #define SELRES 0x301c /* b:resolution */ ! 100: #define SETAL 0x3053 /* w:level */ ! 101: #define SETCLL 0x3061 /* l:color */ ! 102: #define SETCLS 0x3060 /* w:color */ ! 103: #define SETCOL 0x004e /* b:color */ ! 104: #define SETCSZ 0x0058 /* b:width, b:height */ ! 105: #define SETORN 0x0059 /* b:direction */ ! 106: #define SETROC 0x0042 /* b:cmd, b:data, ..., b:end */ ! 107: #define SIGRD 0x005c /* */ ! 108: #define SWSCEN 0x301b /* w:mode */ ! 109: #define SYNCH 0x005f /* b:wait count */ ! 110: #define SZCURS 0x0047 /* w:width, w:height */ ! 111: #define WPIXEL 0x006d /* */ ! 112: #define WRBANK 0x003d /* b:bank */ ! 113: #define WRMASK 0x004f /* b:mask */ ! 114: #define WRMSKL 0x3023 /* l:mask */ ! 115: #define WRMSKS 0x3022 /* w:mask */ ! 116: #define WRR 0x006f /* b:data, ... */ ! 117: #define WRRS 0x3032 /* w:data, ... */ ! 118: #define XDRAW 0x0073 /* */ ! 119: #define ZOOM 0x005a /* b:scale */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.