Meta: Add files to repository

This commit is contained in:
Alec Murphy 2025-02-16 15:21:19 -05:00
parent 6d27d43268
commit 52cb92f587
120 changed files with 71820 additions and 0 deletions

6
src/libtemple/ioport.h Normal file
View file

@ -0,0 +1,6 @@
u8 ioport_read_u8(u16 address);
u16 ioport_read_u16(u16 address);
u32 ioport_read_u32(u16 address);
void ioport_write_u8(u16 address, u8 value);
void ioport_write_u16(u16 address, u16 value);
void ioport_write_u32(u16 address, u32 value);

View file

@ -0,0 +1,77 @@
unsigned long ioport_read_u8(unsigned short address) { return 0; }
unsigned long ioport_read_u16(unsigned short address) { return 0; }
unsigned long ioport_read_u32(unsigned short address) { return 0; }
void ioport_write_u8(unsigned short address, unsigned char value) { }
void ioport_write_u16(unsigned short address, unsigned short value) { }
void ioport_write_u32(unsigned short address, unsigned int value) { }
bool os_blink(char const* frequency_as_string) { return 0; }
unsigned long os_call(unsigned long function_name, unsigned long arg) { return 0; }
unsigned int os_device_calloc(unsigned int size) { return 0; }
void os_exit() { }
char const* os_file_picker(char const* path, char const* glob) { return 0; }
char const* os_files_list(char const* path) { return 0; }
bool os_is_vm() { return 0; }
bool os_path_exists(char const* path) { return 0; }
void os_pc_speaker(char const* frequency_as_string) { }
unsigned long os_random() { return 0; }
unsigned long os_read_entire_file(char const* filename, long* size)
{
return 0;
}
void os_screenshot() { }
char const* os_to_uppercase(char const* input_string) { return 0; }
void os_write_entire_file(char const* filename, unsigned char* buffer,
long size) { }
long pci_find(long class_code) { return 0; }
unsigned long pci_read_u8(long bus, long device, long fun, long offset)
{
return 0;
}
unsigned long pci_read_u16(long bus, long device, long fun, long offset)
{
return 0;
}
unsigned long pci_read_u32(long bus, long device, long fun, long offset)
{
return 0;
}
void pci_write_u8(long bus, long device, long fun, long offset,
unsigned char value) { }
void pci_write_u16(long bus, long device, long fun, long offset,
unsigned short value) { }
void pci_write_u32(long bus, long device, long fun, long offset,
unsigned int value) { }
void time_busy(long duration) { }
long time_jiffies() { return 0; }
long time_now() { return 0; }
void time_sleep(long duration) { }

15
src/libtemple/os.h Normal file
View file

@ -0,0 +1,15 @@
bool os_blink(char const* frequency_as_string);
unsigned long os_call(unsigned long function_name, unsigned long arg);
unsigned int os_device_calloc(unsigned int size);
void os_exit();
char const* os_file_picker(char const* path, char const* glob);
char const* os_files_list(char const* path);
bool os_is_vm();
bool os_path_exists(char const* path);
void os_pc_speaker(char const* frequency_as_string);
unsigned long os_random();
u8* os_read_entire_file(char const* filename, i64* size);
void os_screenshot();
char const* os_to_uppercase(char const* input_string);
void os_write_entire_file(char const* filename, unsigned char* buffer,
i64 size);

10
src/libtemple/pci.h Normal file
View file

@ -0,0 +1,10 @@
long pci_find(long class_code);
unsigned long pci_read_u8(long bus, long device, long fun, long offset);
unsigned long pci_read_u16(long bus, long device, long fun, long offset);
unsigned long pci_read_u32(long bus, long device, long fun, long offset);
void pci_write_u8(long bus, long device, long fun, long offset,
unsigned char value);
void pci_write_u16(long bus, long device, long fun, long offset,
unsigned short value);
void pci_write_u32(long bus, long device, long fun, long offset,
unsigned int value);

4
src/libtemple/time.h Normal file
View file

@ -0,0 +1,4 @@
void time_busy(i64 duration);
i64 time_jiffies();
i64 time_now();
void time_sleep(i64 duration);