source: buchla-68k/vlib/vputs.c@ 0580615

Last change on this file since 0580615 was 0580615, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Point of no return.

  • Property mode set to 100644
File size: 1.7 KB
Line 
1/*
2 =============================================================================
3 vputs.c -- video display string put functions
4 Version 2 -- 1987-03-30 -- D.N. Lynx Crowe
5 (c) Copyright 1987 -- 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
16typedef unsigned int uint;
17
18extern void vputc(unsigned *sbase, unsigned row, unsigned col, unsigned c, unsigned attrib);
19
20/*
21 =============================================================================
22 vputs(sbase, row, col, str, attrib)
23
24 Write string str to video RAM object pointed to by sbase
25 at (row,col) with attrib used for all characters.
26 =============================================================================
27*/
28
29void vputs(uint *sbase, uint row, uint col, uint attrib, char *str)
30{
31 uint c;
32
33 while (c = *str++) {
34
35 vputc(sbase, row, col, c, attrib);
36
37 if (++col GE 64) {
38
39 col = 0;
40
41 if (++row GE 25)
42 row = 0;
43 }
44 }
45}
46
47/*
48 */
49
50/*
51 =============================================================================
52 vputsa(sbase, row, col, str, attrib)
53
54 Write string str in video RAM pointed to by sbase starting
55 at (row, col) using attributes from the words pointed to by attrib.
56 =============================================================================
57*/
58
59void vputsa(uint *sbase, uint row, uint col, uint *attrib, char *str)
60{
61 uint c;
62
63 while (c = *str++) {
64
65 vputc(sbase, row, col, c, *attrib++);
66
67 if (++col GE 64) {
68
69 col = 0;
70
71 if (++row GE 25)
72 row = 0;
73 }
74 }
75}
Note: See TracBrowser for help on using the repository browser.