source: buchla-68k/vlib/vmput.c@ cdb0f36

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

More volatile hardware accesses.

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/*
2 =============================================================================
3 vmput.c -- video menu put functions
4 Version 3 -- 1987-03-30 -- D.N. Lynx Crowe
5 (c) Copyright 1987 -- D.N. Lynx Crowe
6 =============================================================================
7*/
8
9#include "ram.h"
10
11/*
12 =============================================================================
13 vmput(obase, row, col, ms, ma) -- put a menu item in a screen image.
14 Copies lines from ms, with attribute ma, to obase at (row,col).
15 =============================================================================
16*/
17
18void vmput(volatile uint16_t *obase, int16_t row, int16_t col, int8_t *ms[], uint16_t ma)
19{
20 register int16_t c, tc, tr;
21 int8_t *cp;
22
23 tr = row;
24
25 while ((cp = *ms++)) {
26
27 tc = col;
28
29 while ((c = *cp++))
30 vputc(obase, tr, tc++, c, ma);
31
32 tr++;
33 }
34}
35
36/*
37 =============================================================================
38 vmputa(obase, row, col, ms, ma) -- put a menu item in a screen image.
39 Copies lines from ms, with attributes from ma, to obase at (row,col).
40 =============================================================================
41*/
42
43void vmputa(volatile uint16_t *obase, int16_t row, int16_t col, int8_t *ms[], uint16_t *ma[])
44{
45 register int16_t c, tc, tr;
46 uint16_t *tm;
47 int8_t *cp;
48
49 tr = row;
50
51 while ((cp = *ms++)) {
52
53 tc = col;
54 tm = *ma++;
55
56 while ((c = *cp++))
57 vputc(obase, tr, tc++, c, *tm++);
58
59 tr++;
60 }
61}
Note: See TracBrowser for help on using the repository browser.