memset, size_t
This commit is contained in:
parent
fc9df72d76
commit
1563c84457
5
kernel.c
5
kernel.c
|
@ -1,6 +1,7 @@
|
|||
#include"stdio.h"
|
||||
#include"stdint.h"
|
||||
#include"stdbool.h"
|
||||
#include"string.h"
|
||||
|
||||
#define at at8
|
||||
#define at8(x) (*(char*)x)
|
||||
|
@ -28,7 +29,6 @@ __attribute__ ((naked)) static void halt(void)
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
uint8_t*const vram=(uint8_t*)0xB8000;
|
||||
void putpixel(uint8_t*const screen,int32_t x,int32_t y,int32_t color)
|
||||
{
|
||||
|
@ -45,8 +45,7 @@ void kernelmain(void*multiboot_structure,uint32_t magicnumber)
|
|||
{
|
||||
|
||||
// Clear text mode buffer
|
||||
for(int32_t i=0;i<1000;++i)
|
||||
((uint16_t*)0xb8000)[i]=0;
|
||||
memset((void*)0xb8000,0,2000);
|
||||
|
||||
puts("");
|
||||
puts("");
|
||||
|
|
7
stdint.h
7
stdint.h
|
@ -1,9 +1,12 @@
|
|||
#pragma once
|
||||
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned long uint32_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned long uint32_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
typedef uint64_t size_t;
|
||||
|
||||
typedef char int8_t;
|
||||
typedef long int32_t;
|
||||
typedef short int16_t;
|
||||
typedef long int32_t;
|
||||
typedef long long int64_t;
|
||||
|
|
Loading…
Reference in New Issue
Block a user