Add va_list
and rename types.h into stdarg.h
This commit is contained in:
parent
1f164a7a4e
commit
29f085b7aa
@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "interrupt.h"
|
#include "interrupt.h"
|
||||||
#include "types.h"
|
#include "stdarg.h"
|
||||||
|
|
||||||
#define EXCEPTION_INTERRUPT_BASE_ADDRESS 0
|
#define EXCEPTION_INTERRUPT_BASE_ADDRESS 0
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "types.h"
|
#include "stdarg.h"
|
||||||
|
|
||||||
#define IDT_NUM 256
|
#define IDT_NUM 256
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "types.h"
|
#include "stdarg.h"
|
||||||
|
|
||||||
struct interrupt_frame;
|
struct interrupt_frame;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "types.h"
|
#include "stdarg.h"
|
||||||
|
|
||||||
// NIH http://wiki.osdev.org/Inline_Assembly/Examples#I.2FO_access
|
// NIH http://wiki.osdev.org/Inline_Assembly/Examples#I.2FO_access
|
||||||
static inline void outb(uint16_t port, uint8_t val)
|
static inline void outb(uint16_t port, uint8_t val)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "irq.h"
|
#include "irq.h"
|
||||||
#include "idt.h"
|
#include "idt.h"
|
||||||
#include "pic.h"
|
#include "pic.h"
|
||||||
#include "types.h"
|
#include "stdarg.h"
|
||||||
|
|
||||||
int irqSetup()
|
int irqSetup()
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "types.h"
|
#include "stdarg.h"
|
||||||
|
|
||||||
void *memcpy(void *dest, const void *src, size_t n );
|
void *memcpy(void *dest, const void *src, size_t n );
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include "mem.h"
|
#include "mem.h"
|
||||||
#include "multiboot.h"
|
#include "multiboot.h"
|
||||||
#include "pit.h"
|
#include "pit.h"
|
||||||
#include "types.h"
|
#include "stdarg.h"
|
||||||
#include "vga.h"
|
#include "vga.h"
|
||||||
|
|
||||||
#define CHECK_FLAG(flags,bit) ((flags) & (1 << (bit)))
|
#define CHECK_FLAG(flags,bit) ((flags) & (1 << (bit)))
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "types.h"
|
#include "stdarg.h"
|
||||||
|
|
||||||
|
|
||||||
#define PAGE_SHIFT 12
|
#define PAGE_SHIFT 12
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
* @see Intel x86 doc, vol 3 chapter 3.
|
* @see Intel x86 doc, vol 3 chapter 3.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "types.h"
|
#include "stdarg.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Global segment selectors (GDT) for SOS/x86.
|
* Global segment selectors (GDT) for SOS/x86.
|
||||||
|
@ -45,3 +45,8 @@ typedef long ssize_t;
|
|||||||
typedef unsigned int size_t;
|
typedef unsigned int size_t;
|
||||||
typedef int ssize_t;
|
typedef int ssize_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
typedef void *va_list;
|
||||||
|
#define va_start(v, l) ((v) = (va_list) & (l) + sizeof(l))
|
||||||
|
#define va_end(v) ((v) = NULL)
|
||||||
|
#define va_arg(v, type) (*(type *)(((v)+=sizeof(type))-sizeof(type)))
|
@ -1,5 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "types.h"
|
#include "stdarg.h"
|
||||||
|
|
||||||
// https://wiki.osdev.org/Text_UI
|
// https://wiki.osdev.org/Text_UI
|
||||||
#define BLACK 0x00
|
#define BLACK 0x00
|
||||||
|
Loading…
Reference in New Issue
Block a user