Move assembly code to C by using intwrap. It increases core size
by 88 bytes but improves compatibility and maintainability. * grub-core/kern/i386/pc/startup.S (grub_console_putchar): Moved to ... * grub-core/term/i386/pc/console.c (grub_console_putchar_real): ... here. Translated to C. * grub-core/kern/i386/pc/startup.S (grub_console_getkey): Moved to ... * grub-core/term/i386/pc/console.c (grub_console_getkey): ... here. Translated to C. * grub-core/kern/i386/pc/startup.S (grub_console_getxy): Moved to ... * grub-core/term/i386/pc/console.c (grub_console_getxy): ... here. Translated to C. * grub-core/kern/i386/pc/startup.S (grub_console_gotoxy): Moved to ... * grub-core/term/i386/pc/console.c (grub_console_gotoxy): ... here. Translated to C. * grub-core/kern/i386/pc/startup.S (grub_console_cls): Moved to ... * grub-core/term/i386/pc/console.c (grub_console_cls): ... here. Translated to C. * grub-core/kern/i386/pc/startup.S (grub_console_setcursor): Moved to .. * grub-core/term/i386/pc/console.c (grub_console_setcursor): ... here. Translated to C. * grub-core/kern/i386/pc/startup.S (grub_get_rtc): Moved to .. * grub-core/kern/i386/pc/init.c (grub_get_rtc): ... here. Translated to C. * grub-core/term/i386/pc/console.c (int10_9): New function. (grub_console_putchar): Likewise. * include/grub/i386/pc/console.h: Removed the not anymore shared functions.
This commit is contained in:
		
							parent
							
								
									678f4b6713
								
							
						
					
					
						commit
						2b23074a0c
					
				
					 5 changed files with 266 additions and 375 deletions
				
			
		|  | @ -26,16 +26,6 @@ | |||
| #include <grub/term.h> | ||||
| #include <grub/i386/vga_common.h> | ||||
| 
 | ||||
| /* These are global to share code between C and asm.  */ | ||||
| int grub_console_getkey (struct grub_term_input *term); | ||||
| grub_uint16_t grub_console_getxy (struct grub_term_output *term); | ||||
| void grub_console_gotoxy (struct grub_term_output *term, | ||||
| 			  grub_uint8_t x, grub_uint8_t y); | ||||
| void grub_console_cls (struct grub_term_output *term); | ||||
| void grub_console_setcursor (struct grub_term_output *term, int on); | ||||
| void grub_console_putchar (struct grub_term_output *term, | ||||
| 			   const struct grub_unicode_glyph *c); | ||||
| 
 | ||||
| /* Initialize the console system.  */ | ||||
| void grub_console_init (void); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue