Added an idle function for long running functions to call.

This commit is contained in:
2018-11-11 17:32:56 -06:00
parent f76c5071ec
commit 55efa49fae
3 changed files with 7 additions and 1 deletions
+1
View File
@@ -10,6 +10,7 @@ extern int strlen(const char *str);
extern unsigned char inportb (unsigned short _port);
extern void outportb (unsigned short _port, unsigned char _data);
extern bool strcmp(char* str1, char* str2);
extern void idle();
/* ISRS.C */
void isrs_install();
/* This defines what the stack looks like after an ISR was running */
+5
View File
@@ -114,4 +114,9 @@ void main()
/* ...and leave this loop in. There is an endless loop in
* 'start.asm' also, if you accidentally delete this next line */
for (;;);
}
void idle()
{
__asm__ __volatile__ ("hlt");
}
+1 -1
View File
@@ -9,7 +9,7 @@ void run_shell()
puts("Starting interactive shell...\n");
commandbuffer[0] = '\0';
puts("#>");
for(;;);
for(;;) idle();
}
void key_pressed(unsigned char* character)