BufferedCGA refactoring
This commit is contained in:
@ -3,20 +3,20 @@
|
|||||||
// Can't initialize in constructor as memory management already needs working CGA for output
|
// Can't initialize in constructor as memory management already needs working CGA for output
|
||||||
// NOTE: This has to be called when memorymanagement is active
|
// NOTE: This has to be called when memorymanagement is active
|
||||||
void BufferedCGA::init(unsigned int pages) {
|
void BufferedCGA::init(unsigned int pages) {
|
||||||
this->scrollback_buffer = new ScrollbackBuffer(COLUMNS, ROWS, pages);
|
this->scrollback_buffer = new ScrollbackBuffer(ROWS, pages);
|
||||||
this->initialized = true;
|
this->initialized = true;
|
||||||
|
|
||||||
this->print("\nInitialized scrollback buffer\n\n", 32);
|
this->print("\nInitialized scrollback buffer\n\n", 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BufferedCGA::displaypage() {
|
void BufferedCGA::display_scrollback() {
|
||||||
if (this->initialized) {
|
if (this->initialized) {
|
||||||
if (this->current_page == 0) {
|
if (this->scrollback == 0) {
|
||||||
// Use pagebuffer
|
// Use pagebuffer
|
||||||
this->scrollback_buffer->copy_page_from_pagebuffer((cga_page_t*)CGA_START);
|
this->scrollback_buffer->copy_from_pagebuffer((cga_page_t*)CGA_START);
|
||||||
} else {
|
} else {
|
||||||
// Use scrollback
|
// Use scrollback
|
||||||
this->scrollback_buffer->copy_page_from_buffer((cga_line_t*)CGA_START, this->current_page - 1);
|
this->scrollback_buffer->get((cga_line_t*)CGA_START, this->scrollback - 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this->print("ScrollbackBuffer not initialized\n\n", 34);
|
this->print("ScrollbackBuffer not initialized\n\n", 34);
|
||||||
@ -24,11 +24,11 @@ void BufferedCGA::displaypage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void BufferedCGA::print(char* string, int n, unsigned char attrib) {
|
void BufferedCGA::print(char* string, int n, unsigned char attrib) {
|
||||||
if (this->current_page != 0) {
|
if (this->scrollback != 0) {
|
||||||
// Display newest content from buffer when new prints happen
|
// Display newest content from buffer when new prints happen
|
||||||
|
|
||||||
this->current_page = 0;
|
this->scrollback = 0;
|
||||||
this->displaypage();
|
this->display_scrollback();
|
||||||
}
|
}
|
||||||
|
|
||||||
CGA::print(string, n, attrib);
|
CGA::print(string, n, attrib);
|
||||||
@ -36,7 +36,7 @@ void BufferedCGA::print(char* string, int n, unsigned char attrib) {
|
|||||||
|
|
||||||
void BufferedCGA::scrollup() {
|
void BufferedCGA::scrollup() {
|
||||||
if (this->initialized) {
|
if (this->initialized) {
|
||||||
this->scrollback_buffer->line_to_buffer((cga_line_t*)CGA_START);
|
this->scrollback_buffer->put((cga_line_t*)CGA_START);
|
||||||
} else {
|
} else {
|
||||||
this->print("ScrollbackBuffer not initialized\n\n", 34);
|
this->print("ScrollbackBuffer not initialized\n\n", 34);
|
||||||
}
|
}
|
||||||
@ -46,7 +46,7 @@ void BufferedCGA::scrollup() {
|
|||||||
|
|
||||||
void BufferedCGA::clear() {
|
void BufferedCGA::clear() {
|
||||||
CGA::clear();
|
CGA::clear();
|
||||||
this->current_page = 0;
|
this->scrollback = 0;
|
||||||
|
|
||||||
if (this->initialized) {
|
if (this->initialized) {
|
||||||
this->scrollback_buffer->clear();
|
this->scrollback_buffer->clear();
|
||||||
@ -59,16 +59,16 @@ void BufferedCGA::scroll_page_backward() {
|
|||||||
if (this->initialized) {
|
if (this->initialized) {
|
||||||
|
|
||||||
// If this is the first scrollback we have to save the current screen content
|
// If this is the first scrollback we have to save the current screen content
|
||||||
if (this->current_page == 0) {
|
if (this->scrollback == 0) {
|
||||||
this->scrollback_buffer->copy_page_to_pagebuffer((cga_page_t*)CGA_START);
|
this->scrollback_buffer->copy_to_pagebuffer((cga_page_t*)CGA_START);
|
||||||
}
|
}
|
||||||
|
|
||||||
// current_page can be equal to scrollback_buffer->pages
|
// current_page can be equal to scrollback_buffer->pages
|
||||||
// as we have a separate pagebuffer for the current screen content
|
// as we have a separate pagebuffer for the current screen content
|
||||||
if (this->current_page < this->scrollback_buffer->pages) {
|
if (this->scrollback < this->scrollback_buffer->pages) {
|
||||||
this->current_page = this->current_page + 1;
|
this->scrollback = this->scrollback + 1;
|
||||||
}
|
}
|
||||||
this->displaypage();
|
this->display_scrollback();
|
||||||
} else {
|
} else {
|
||||||
this->print("ScrollbackBuffer not initialized\n\n", 34);
|
this->print("ScrollbackBuffer not initialized\n\n", 34);
|
||||||
}
|
}
|
||||||
@ -77,10 +77,10 @@ void BufferedCGA::scroll_page_backward() {
|
|||||||
void BufferedCGA::scroll_page_forward() {
|
void BufferedCGA::scroll_page_forward() {
|
||||||
if (this->initialized) {
|
if (this->initialized) {
|
||||||
|
|
||||||
if (this->current_page > 0) {
|
if (this->scrollback > 0) {
|
||||||
this->current_page = this->current_page - 1;
|
this->scrollback = this->scrollback - 1;
|
||||||
}
|
}
|
||||||
this->displaypage();
|
this->display_scrollback();
|
||||||
} else {
|
} else {
|
||||||
this->print("ScrollbackBuffer not initialized\n\n", 34);
|
this->print("ScrollbackBuffer not initialized\n\n", 34);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,13 +14,17 @@ private:
|
|||||||
|
|
||||||
BufferedCGA(const CGA& copy);
|
BufferedCGA(const CGA& copy);
|
||||||
|
|
||||||
void displaypage(); // Write the current_page to CGA memory
|
void display_scrollback(); // Write the current_page to CGA memory
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BufferedCGA() : CGA(), initialized(false), current_page(0) {};
|
BufferedCGA() : CGA(), initialized(false), scrollback(0) {};
|
||||||
|
~BufferedCGA() {
|
||||||
|
if (this->initialized) { delete this->scrollback_buffer; }
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned char scrollback; // The page that is displayed, public to enable page display
|
||||||
|
|
||||||
void init(unsigned int pages); // Scrollback needs to be initialized after memorymanagement
|
void init(unsigned int pages); // Scrollback needs to be initialized after memorymanagement
|
||||||
unsigned char current_page; // The page that is displayed
|
|
||||||
void scroll_page_backward(); // Scroll up the page history
|
void scroll_page_backward(); // Scroll up the page history
|
||||||
void scroll_page_forward(); // Scroll down the page history (to the current page)
|
void scroll_page_forward(); // Scroll down the page history (to the current page)
|
||||||
|
|
||||||
|
|||||||
@ -355,11 +355,11 @@ void scroll_mode(Key key) {
|
|||||||
switch ((char)key) {
|
switch ((char)key) {
|
||||||
case 'k':
|
case 'k':
|
||||||
kout.scroll_page_backward();
|
kout.scroll_page_backward();
|
||||||
kout.show(kout.COLUMNS - 1, 0, (char)(48 + kout.current_page));
|
kout.show(kout.COLUMNS - 1, 0, (char)(48 + kout.scrollback));
|
||||||
break;
|
break;
|
||||||
case 'j':
|
case 'j':
|
||||||
kout.scroll_page_forward();
|
kout.scroll_page_forward();
|
||||||
kout.show(kout.COLUMNS - 1, 0, (char)(48 + kout.current_page));
|
kout.show(kout.COLUMNS - 1, 0, (char)(48 + kout.scrollback));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
#define __OutStream_include__
|
#define __OutStream_include__
|
||||||
|
|
||||||
#include "lib/StringBuffer.h"
|
#include "lib/StringBuffer.h"
|
||||||
|
#include <concepts>
|
||||||
|
|
||||||
// NOTE: I added this
|
// NOTE: I added this
|
||||||
class fillw {
|
class fillw {
|
||||||
@ -71,11 +72,14 @@ public:
|
|||||||
// OPERATOR << : Umwandlung des angegebenen Datentypes in eine
|
// OPERATOR << : Umwandlung des angegebenen Datentypes in eine
|
||||||
// Zeichenkette.
|
// Zeichenkette.
|
||||||
|
|
||||||
// NOTE: I changed the stream manipulators to templates to be usable with different streams
|
// NOTE: I changed the stream manipulators to templates to be usable with different streams.
|
||||||
// Needed because I added manipulators to the CGA_Stream class
|
// If a Stream derived from OutStream gets passed to a operator<< the type won't be "lowered".
|
||||||
|
// This allows chaining of operator<< of different streams.
|
||||||
|
// Needed because I added operator<< overloads to the CGA_Stream class to change color with manipulators.
|
||||||
|
|
||||||
// Darstellung eines Zeichens (trivial)
|
// Darstellung eines Zeichens (trivial)
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
requires std::derived_from<T, OutStream>
|
||||||
friend T& operator<<(T& os, char c) {
|
friend T& operator<<(T& os, char c) {
|
||||||
os.put(c);
|
os.put(c);
|
||||||
if (c != '\n') {
|
if (c != '\n') {
|
||||||
@ -86,12 +90,14 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
requires std::derived_from<T, OutStream>
|
||||||
friend T& operator<<(T& os, unsigned char c) {
|
friend T& operator<<(T& os, unsigned char c) {
|
||||||
return os << (char)c;
|
return os << (char)c;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Darstellung einer nullterminierten Zeichenkette
|
// Darstellung einer nullterminierten Zeichenkette
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
requires std::derived_from<T, OutStream>
|
||||||
friend T& operator<<(T& os, char* string) {
|
friend T& operator<<(T& os, char* string) {
|
||||||
|
|
||||||
char* pos = string;
|
char* pos = string;
|
||||||
@ -105,26 +111,31 @@ public:
|
|||||||
|
|
||||||
// Darstellung ganzer Zahlen im Zahlensystem zur Basis base
|
// Darstellung ganzer Zahlen im Zahlensystem zur Basis base
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
requires std::derived_from<T, OutStream>
|
||||||
friend T& operator<<(T& os, short ival) {
|
friend T& operator<<(T& os, short ival) {
|
||||||
return os << (long)ival;
|
return os << (long)ival;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
requires std::derived_from<T, OutStream>
|
||||||
friend T& operator<<(T& os, unsigned short ival) {
|
friend T& operator<<(T& os, unsigned short ival) {
|
||||||
return os << (unsigned long)ival;
|
return os << (unsigned long)ival;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
requires std::derived_from<T, OutStream>
|
||||||
friend T& operator<<(T& os, int ival) {
|
friend T& operator<<(T& os, int ival) {
|
||||||
return os << (long)ival;
|
return os << (long)ival;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
requires std::derived_from<T, OutStream>
|
||||||
friend T& operator<<(T& os, unsigned int ival) {
|
friend T& operator<<(T& os, unsigned int ival) {
|
||||||
return os << (unsigned long)ival;
|
return os << (unsigned long)ival;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
requires std::derived_from<T, OutStream>
|
||||||
friend T& operator<<(T& os, long ival) {
|
friend T& operator<<(T& os, long ival) {
|
||||||
// Bei negativen Werten wird ein Minuszeichen ausgegeben.
|
// Bei negativen Werten wird ein Minuszeichen ausgegeben.
|
||||||
if (ival < 0) {
|
if (ival < 0) {
|
||||||
@ -136,6 +147,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
requires std::derived_from<T, OutStream>
|
||||||
friend T& operator<<(T& os, unsigned long ival) {
|
friend T& operator<<(T& os, unsigned long ival) {
|
||||||
unsigned long div;
|
unsigned long div;
|
||||||
char digit;
|
char digit;
|
||||||
@ -167,6 +179,7 @@ public:
|
|||||||
|
|
||||||
// Darstellung eines Zeigers als hexadezimale ganze Zahl
|
// Darstellung eines Zeigers als hexadezimale ganze Zahl
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
requires std::derived_from<T, OutStream>
|
||||||
friend T& operator<<(T& os, void* ptr) {
|
friend T& operator<<(T& os, void* ptr) {
|
||||||
int oldbase = os.base;
|
int oldbase = os.base;
|
||||||
os.base = 16;
|
os.base = 16;
|
||||||
@ -178,12 +191,14 @@ public:
|
|||||||
// Aufruf einer Manipulatorfunktion
|
// Aufruf einer Manipulatorfunktion
|
||||||
// NOTE: Changed the function pointer type including the manipulator functions
|
// NOTE: Changed the function pointer type including the manipulator functions
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
requires std::derived_from<T, OutStream>
|
||||||
friend T& operator<<(T& os, T& (*f)(T&)) {
|
friend T& operator<<(T& os, T& (*f)(T&)) {
|
||||||
return f(os);
|
return f(os);
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: I added this
|
// NOTE: I added this
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
requires std::derived_from<T, OutStream>
|
||||||
friend T& operator<<(T& os, const fillw& w) {
|
friend T& operator<<(T& os, const fillw& w) {
|
||||||
os.flush(); // Flush the buffer to not modify previous output
|
os.flush(); // Flush the buffer to not modify previous output
|
||||||
os.fill_width = w.w;
|
os.fill_width = w.w;
|
||||||
@ -191,6 +206,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
requires std::derived_from<T, OutStream>
|
||||||
friend T& operator<<(T& os, const fillc& c) {
|
friend T& operator<<(T& os, const fillc& c) {
|
||||||
os.flush();
|
os.flush();
|
||||||
os.fill_char = c.c;
|
os.fill_char = c.c;
|
||||||
|
|||||||
@ -2,21 +2,14 @@
|
|||||||
|
|
||||||
// NOTE: I added this file
|
// NOTE: I added this file
|
||||||
|
|
||||||
void ScrollbackBuffer::buffer_next_line() {
|
void ScrollbackBuffer::put(CGA::cga_line_t* line) {
|
||||||
this->current_linenumber = this->current_linenumber + 1;
|
CGA::cga_line_t* destination = (CGA::cga_line_t*)this->buffer + this->pos;
|
||||||
this->current_linenumber = this->current_linenumber % this->lines;
|
mmem::memcpy<CGA::cga_line_t>(destination, line);
|
||||||
|
|
||||||
|
this->pos = (this->pos + 1) % this->rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGA::cga_line_t* ScrollbackBuffer::get_current_line() const {
|
void ScrollbackBuffer::get(CGA::cga_line_t* destination, unsigned char page) const {
|
||||||
return (CGA::cga_line_t*)(this->buffer + this->current_linenumber);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScrollbackBuffer::line_to_buffer(CGA::cga_line_t* line) {
|
|
||||||
mmem::memcpy<CGA::cga_line_t>(this->get_current_line(), line);
|
|
||||||
this->buffer_next_line();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScrollbackBuffer::copy_page_from_buffer(CGA::cga_line_t* destination, unsigned char page) const {
|
|
||||||
if (page < 0 || page >= this->pages) {
|
if (page < 0 || page >= this->pages) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -38,24 +31,24 @@ void ScrollbackBuffer::copy_page_from_buffer(CGA::cga_line_t* destination, unsig
|
|||||||
// LINE 6 | - [...]
|
// LINE 6 | - [...]
|
||||||
// LINE 7 | - line = 3 => wrapline = (5 + 0 * 4 + 3) % 8 = 0
|
// LINE 7 | - line = 3 => wrapline = (5 + 0 * 4 + 3) % 8 = 0
|
||||||
unsigned int wrapline;
|
unsigned int wrapline;
|
||||||
for (unsigned int line = 0; line < this->pageheight; ++line) {
|
for (unsigned int line = 0; line < (this->rows / this->pages); ++line) {
|
||||||
wrapline = (this->current_linenumber + rpage * this->pageheight + line) % this->lines;
|
wrapline = (this->pos + rpage * (this->rows / this->pages) + line) % this->rows;
|
||||||
mmem::memcpy<CGA::cga_line_t>(destination + line, this->buffer + wrapline);
|
mmem::memcpy<CGA::cga_line_t>(destination + line, (CGA::cga_line_t*)this->buffer + wrapline);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScrollbackBuffer::copy_page_from_pagebuffer(CGA::cga_page_t* destination) const {
|
void ScrollbackBuffer::copy_from_pagebuffer(CGA::cga_page_t* destination) const {
|
||||||
mmem::memcpy<CGA::cga_page_t>(destination, this->pagebuffer);
|
mmem::memcpy<CGA::cga_page_t>(destination, this->pagebuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScrollbackBuffer::copy_page_to_pagebuffer(CGA::cga_page_t* source) {
|
void ScrollbackBuffer::copy_to_pagebuffer(CGA::cga_page_t* source) {
|
||||||
mmem::memcpy<CGA::cga_page_t>(this->pagebuffer, source);
|
mmem::memcpy<CGA::cga_page_t>(this->pagebuffer, source);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScrollbackBuffer::clear() {
|
void ScrollbackBuffer::clear() {
|
||||||
for (unsigned char page = 0; page < this->pages; ++page) {
|
for (unsigned char page = 0; page < this->pages; ++page) {
|
||||||
mmem::zero<CGA::cga_page_t>((CGA::cga_page_t*)this->buffer + page);
|
mmem::zero<CGA::cga_page_t>(this->buffer + page);
|
||||||
}
|
}
|
||||||
mmem::zero<CGA::cga_page_t>(this->pagebuffer);
|
mmem::zero<CGA::cga_page_t>(this->pagebuffer);
|
||||||
this->current_linenumber = 0;
|
this->pos = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,32 +10,32 @@
|
|||||||
// The buffer dimensions must match with the destination dimensions
|
// The buffer dimensions must match with the destination dimensions
|
||||||
class ScrollbackBuffer {
|
class ScrollbackBuffer {
|
||||||
private:
|
private:
|
||||||
CGA::cga_line_t* buffer; // Circular buffer to store lines that left the screen
|
CGA::cga_page_t* buffer; // Circular buffer to store lines that left the screen
|
||||||
CGA::cga_page_t* pagebuffer; // Contains the current page separately from the scrollback.
|
CGA::cga_page_t* pagebuffer; // Contains the current page separately from the scrollback.
|
||||||
// I thought this was easier since it also captures the little output
|
// I thought this was easier since it also captures the little output
|
||||||
// generated before the scrollback buffer is initialized
|
// generated before the scrollback buffer is initialized by accident
|
||||||
// (but only if it's less than a page)
|
// (but only if it's less than a page)
|
||||||
unsigned int current_linenumber;
|
unsigned int pos;
|
||||||
|
|
||||||
CGA::cga_line_t* get_current_line() const; // Translate linenumber to memory location
|
|
||||||
void buffer_next_line(); // Moves the current_line one line forward
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
const unsigned int pageheight, // Number of lines per page
|
const unsigned int pages; // Number of pages in buffer
|
||||||
pages, // Number of pages in buffer
|
const unsigned int rows; // Number of lines in buffer
|
||||||
lines; // Total number of lines in buffer
|
|
||||||
|
|
||||||
ScrollbackBuffer(unsigned char width, unsigned char height, unsigned char pages)
|
ScrollbackBuffer(unsigned char rows, unsigned char pages)
|
||||||
: current_linenumber(0), pageheight(height), pages(pages), lines(height * pages) {
|
: pos(0), pages(pages), rows(rows * pages) {
|
||||||
this->buffer = new CGA::cga_line_t[lines];
|
this->buffer = new CGA::cga_page_t[pages];
|
||||||
this->pagebuffer = new CGA::cga_page_t;
|
this->pagebuffer = new CGA::cga_page_t;
|
||||||
this->clear(); // Null out the buffer so no crap gets displayed
|
this->clear(); // Null out the buffer so no crap gets displayed
|
||||||
}
|
}
|
||||||
|
~ScrollbackBuffer() {
|
||||||
|
delete[] this->buffer;
|
||||||
|
delete this->pagebuffer;
|
||||||
|
}
|
||||||
|
|
||||||
void line_to_buffer(CGA::cga_line_t* line);
|
void put(CGA::cga_line_t* line);
|
||||||
void copy_page_from_buffer(CGA::cga_line_t* destination, unsigned char page) const;
|
void get(CGA::cga_line_t* destination, unsigned char page) const;
|
||||||
void copy_page_from_pagebuffer(CGA::cga_page_t* destination) const;
|
void copy_from_pagebuffer(CGA::cga_page_t* destination) const;
|
||||||
void copy_page_to_pagebuffer(CGA::cga_page_t* source);
|
void copy_to_pagebuffer(CGA::cga_page_t* source);
|
||||||
void clear();
|
void clear();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
10
c_os/main.cc
10
c_os/main.cc
@ -23,12 +23,6 @@ int main() {
|
|||||||
|
|
||||||
// Initialize scrollback buffer after allocator.init()
|
// Initialize scrollback buffer after allocator.init()
|
||||||
kout.init(5);
|
kout.init(5);
|
||||||
kout.show(kout.COLUMNS - 1, 0, (char)(48 + kout.current_page)); // Show current page
|
|
||||||
|
|
||||||
// text_demo();
|
|
||||||
// sound_demo();
|
|
||||||
// keyboard_demo();
|
|
||||||
// heap_demo();
|
|
||||||
|
|
||||||
// Tastatur-Unterbrechungsroutine 'einstoepseln'
|
// Tastatur-Unterbrechungsroutine 'einstoepseln'
|
||||||
/* hier muss Code eingefuegt werden */
|
/* hier muss Code eingefuegt werden */
|
||||||
@ -38,6 +32,10 @@ int main() {
|
|||||||
/* hier muss Code eingefuegt werden */
|
/* hier muss Code eingefuegt werden */
|
||||||
cpu.enable_int();
|
cpu.enable_int();
|
||||||
|
|
||||||
|
// text_demo();
|
||||||
|
// sound_demo();
|
||||||
|
// keyboard_demo();
|
||||||
|
heap_demo();
|
||||||
// key_irq_demo();
|
// key_irq_demo();
|
||||||
|
|
||||||
while (1) {};
|
while (1) {};
|
||||||
|
|||||||
Reference in New Issue
Block a user