[109c83b] | 1 | /*
|
---|
| 2 | =============================================================================
|
---|
| 3 | vputsv.c -- video display string put functions
|
---|
| 4 | Version 1 -- 1988-10-06 -- D.N. Lynx Crowe
|
---|
| 5 | (c) Copyright 1988 -- D.N. Lynx Crowe
|
---|
| 6 |
|
---|
| 7 | These functions drive the video character write function vputc()
|
---|
| 8 | which puts characters into a 82716 video RAM character object.
|
---|
| 9 |
|
---|
| 10 | Full attribute format is assumed.
|
---|
| 11 | =============================================================================
|
---|
| 12 | */
|
---|
| 13 |
|
---|
| 14 | #include "stddefs.h"
|
---|
| 15 |
|
---|
| 16 | typedef unsigned int uint;
|
---|
| 17 |
|
---|
| 18 | extern int vputcv();
|
---|
| 19 |
|
---|
| 20 | /*
|
---|
| 21 | =============================================================================
|
---|
| 22 | vputsv(sbase, row, col, str, attrib, len)
|
---|
| 23 |
|
---|
| 24 | Write string str to video RAM object pointed to by sbase
|
---|
| 25 | at (row,col) with attrib used for all characters. Line length is len.
|
---|
| 26 | =============================================================================
|
---|
| 27 | */
|
---|
| 28 |
|
---|
| 29 | vputsv(sbase, row, col, str, attrib, len)
|
---|
| 30 | uint *sbase, row, col;
|
---|
| 31 | char *str;
|
---|
| 32 | uint attrib, len;
|
---|
| 33 | {
|
---|
| 34 | uint c;
|
---|
| 35 |
|
---|
| 36 | while (c = *str++) {
|
---|
| 37 |
|
---|
| 38 | vputcv(sbase, row, col, c, attrib, len);
|
---|
| 39 |
|
---|
| 40 | if (++col GE 64) {
|
---|
| 41 |
|
---|
| 42 | col = 0;
|
---|
| 43 |
|
---|
| 44 | if (++row GE 25)
|
---|
| 45 | row = 0;
|
---|
| 46 | }
|
---|
| 47 | }
|
---|
| 48 | }
|
---|
| 49 |
|
---|
| 50 | /* |
---|
| 51 | */
|
---|
| 52 |
|
---|
| 53 | /*
|
---|
| 54 | =============================================================================
|
---|
| 55 | vputsav(sbase, row, col, str, attrib, len)
|
---|
| 56 |
|
---|
| 57 | Write string str in video RAM pointed to by sbase starting
|
---|
| 58 | at (row, col) using attributes from the words pointed to by attrib.
|
---|
| 59 | Line length is len.
|
---|
| 60 | =============================================================================
|
---|
| 61 | */
|
---|
| 62 |
|
---|
| 63 | vputsav(sbase, row, col, str, attrib, len)
|
---|
| 64 | uint *sbase, row, col;
|
---|
| 65 | char *str;
|
---|
| 66 | uint *attrib, len;
|
---|
| 67 | {
|
---|
| 68 | uint c;
|
---|
| 69 |
|
---|
| 70 | while (c = *str++) {
|
---|
| 71 |
|
---|
| 72 | vputcv(sbase, row, col, c, *attrib++, len);
|
---|
| 73 |
|
---|
| 74 | if (++col GE 64) {
|
---|
| 75 |
|
---|
| 76 | col = 0;
|
---|
| 77 |
|
---|
| 78 | if (++row GE 25)
|
---|
| 79 | row = 0;
|
---|
| 80 | }
|
---|
| 81 | }
|
---|
| 82 | }
|
---|