2 colcycle - color cycling image viewer
3 Copyright (C) 2016 John Tsiombikas <nuclear@member.fsf.org>
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 void dpmi_real_int(int inum, struct dpmi_real_regs *regs)
22 unsigned char int_num = (unsigned char)inum;
33 void *dpmi_mmap(uint32_t phys_addr, unsigned int size)
35 uint16_t mem_high, mem_low;
36 uint16_t phys_high = phys_addr >> 16;
37 uint16_t phys_low = phys_addr & 0xffff;
38 uint16_t size_high = size >> 16;
39 uint16_t size_low = size & 0xffff;
40 unsigned int err, res = 0;
58 return (void*)(((uint32_t)mem_high << 16) | ((uint32_t)mem_low));
61 void dpmi_munmap(void *addr)
63 uint16_t mem_high = (uint32_t)addr >> 16;
64 uint16_t mem_low = (uint16_t)addr;