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

Last change on this file since 5c977dd 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
RevLine 
[f40a309]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
[b28a12e]9#include "ram.h"
[f40a309]10
11/*
12 =============================================================================
[09d1345]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).
[f40a309]15 =============================================================================
16*/
17
[8c8b4e5]18void vmput(volatile uint16_t *obase, int16_t row, int16_t col, int8_t *ms[], uint16_t ma)
[f40a309]19{
[09d1345]20 register int16_t c, tc, tr;
[7258c6a]21 int8_t *cp;
[f40a309]22
23 tr = row;
24
[bf89cfb]25 while ((cp = *ms++)) {
[f40a309]26
27 tc = col;
28
[bf89cfb]29 while ((c = *cp++))
[09d1345]30 vputc(obase, tr, tc++, c, ma);
[f40a309]31
32 tr++;
33 }
34}
35
36/*
37 =============================================================================
[09d1345]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).
[f40a309]40 =============================================================================
41*/
42
[8c8b4e5]43void vmputa(volatile uint16_t *obase, int16_t row, int16_t col, int8_t *ms[], uint16_t *ma[])
[f40a309]44{
[09d1345]45 register int16_t c, tc, tr;
[7258c6a]46 uint16_t *tm;
47 int8_t *cp;
[f40a309]48
49 tr = row;
50
[bf89cfb]51 while ((cp = *ms++)) {
[f40a309]52
53 tc = col;
54 tm = *ma++;
55
[bf89cfb]56 while ((c = *cp++))
[09d1345]57 vputc(obase, tr, tc++, c, *tm++);
[f40a309]58
59 tr++;
60 }
61}
Note: See TracBrowser for help on using the repository browser.