refactor ALTCHAR switch to C

This commit is contained in:
Aaron Culliney 2014-05-10 21:41:48 -07:00
parent e6c582bab6
commit 2932c6b832
2 changed files with 23 additions and 24 deletions

View File

@ -152,30 +152,6 @@
return80: movb $0x80,%al
ret
E(iie_altchar_off)
testl $SS_ALTCHAR, SN(softswitches)
jz ram_nop
andl $~SS_ALTCHAR, SN(softswitches)
pushal
call SN(c_set_primary_char)
popal
ret
E(iie_altchar_on)
testl $SS_ALTCHAR, SN(softswitches)
jnz ram_nop
orl $SS_ALTCHAR, SN(softswitches)
pushal
call SN(c_set_altchar)
popal
ret
E(iie_check_altchar)
testl $SS_ALTCHAR, SN(softswitches)
jnz return80
xorb %al, %al
ret
/* unset ioudis flag and read_gc_strobe */
E(iie_ioudis_off)
andl $~SS_IOUDIS, SN(softswitches)

View File

@ -673,3 +673,26 @@ GLUE_C_READ(iie_check_80col)
return (softswitches & SS_80COL) ? 0x80 : 0x00;
}
GLUE_C_READ(iie_altchar_off)
{
if (softswitches & SS_ALTCHAR) {
softswitches &= ~SS_ALTCHAR;
c_set_primary_char();
}
return 0x0;
}
GLUE_C_READ(iie_altchar_on)
{
if (!(softswitches & SS_ALTCHAR)) {
softswitches |= SS_ALTCHAR;
c_set_altchar();
}
return 0x0;
}
GLUE_C_READ(iie_check_altchar)
{
return (softswitches & SS_ALTCHAR) ? 0x80 : 0x00;
}