summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-07-05 16:56:32 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2017-07-05 16:56:32 +0200
commit6ed0ae250b5666b8a2657225106fd759f03ae975 (patch)
tree7e2cb5a48ec276fce457b0bba907f0a7be3ce6d5 /src
parentc302b8a5a4b2fadf29b4f695dca7ba97b0491ba6 (diff)
downloadabaos-6ed0ae250b5666b8a2657225106fd759f03ae975.tar.gz
abaos-6ed0ae250b5666b8a2657225106fd759f03ae975.tar.bz2
removed unneded volatile for text VIDEO_MEMORY (we should add the reference to "volatile is always wrong"
Diffstat (limited to 'src')
-rw-r--r--src/kernel/vgatext.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/kernel/vgatext.c b/src/kernel/vgatext.c
index 49c8c3c..13a089e 100644
--- a/src/kernel/vgatext.c
+++ b/src/kernel/vgatext.c
@@ -37,7 +37,7 @@ void vga_text_init( vga_text_t *vga_text )
void vga_text_clear_screen( vga_text_t *vga_text )
{
- volatile uint8_t *VIDEO_MEMORY = (uint8_t *)0xb8000;
+ uint8_t *VIDEO_MEMORY = (uint8_t *)0xb8000;
for( int i = 0; i < 2 * ( vga_text->res_x * vga_text->res_y ); i += 2 ) {
*(VIDEO_MEMORY+i) = ' ';
@@ -124,7 +124,7 @@ static int calculate_offset( vga_text_t *vga_text, const int x, const int y )
static void scroll_screen( vga_text_t *vga_text )
{
- volatile uint8_t *VIDEO_MEMORY = (uint8_t *)0xb8000;
+ uint8_t *VIDEO_MEMORY = (uint8_t *)0xb8000;
memmove( (void *)VIDEO_MEMORY, (const void *)VIDEO_MEMORY + 2 * vga_text->res_x, 2 * ( vga_text->res_y - 1 ) * vga_text->res_x );
@@ -171,7 +171,7 @@ void vga_text_put_char( vga_text_t *vga_text, const char c )
{
int offset = calculate_offset( vga_text, vga_text->cursor_x, vga_text->cursor_y );
- volatile uint8_t *VIDEO_MEMORY = (uint8_t *)0xb8000;
+ uint8_t *VIDEO_MEMORY = (uint8_t *)0xb8000;
*(VIDEO_MEMORY+offset) = (uint8_t)c;
*(VIDEO_MEMORY+offset+1) = calculate_color_cell( vga_text );
@@ -209,7 +209,7 @@ void vga_text_set_background_color_at( vga_text_t *vga_text, const int x, const
{
int offset = calculate_offset( vga_text, x, y );
- volatile uint8_t *VIDEO_MEMORY = (uint8_t *)0xb8000;
+ uint8_t *VIDEO_MEMORY = (uint8_t *)0xb8000;
*(VIDEO_MEMORY+offset+1) = ( *(VIDEO_MEMORY+offset+1) & 0x0f ) | ( color << 4 );
}
@@ -217,7 +217,7 @@ vga_text_color_t vga_text_get_background_color_at( vga_text_t *vga_text, const i
{
int offset = calculate_offset( vga_text, x, y );
- volatile uint8_t *VIDEO_MEMORY = (uint8_t *)0xb8000;
+ uint8_t *VIDEO_MEMORY = (uint8_t *)0xb8000;
uint8_t cell = *(VIDEO_MEMORY+offset+1);
return cell & 0xf0;
@@ -227,7 +227,7 @@ void vga_text_inverse_colors_at( vga_text_t *vga_text, const int x, const int y
{
int offset = calculate_offset( vga_text, x, y );
- volatile uint8_t *VIDEO_MEMORY = (uint8_t *)0xb8000;
+ uint8_t *VIDEO_MEMORY = (uint8_t *)0xb8000;
*(VIDEO_MEMORY+offset+1) = ( ( *(VIDEO_MEMORY+offset+1) & 0x0f ) << 4 )
| ( ( *(VIDEO_MEMORY+offset+1) & 0xf0 ) >> 4 );
}
@@ -264,14 +264,14 @@ void vga_text_hide_mouse_cursor( vga_text_t *vga_text )
void vga_text_save( vga_text_t *vga_text )
{
- volatile uint8_t *VIDEO_MEMORY = (uint8_t *)0xA0000;
+ uint8_t *VIDEO_MEMORY = (uint8_t *)0xA0000;
memcpy( vga_text->buf, (const uint8_t *)VIDEO_MEMORY, 2*65535 );
}
void vga_text_restore( vga_text_t *vga_text )
{
- volatile uint8_t *VIDEO_MEMORY = (uint8_t *)0xA0000;
+ uint8_t *VIDEO_MEMORY = (uint8_t *)0xA0000;
memcpy( (void *)VIDEO_MEMORY, (const uint8_t *)vga_text->buf, 2*65535 );
}