mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-12-24 18:31:51 +00:00
refactor ALTCHAR switch to C
This commit is contained in:
parent
e6c582bab6
commit
2932c6b832
@ -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)
|
||||
|
23
src/vm.c
23
src/vm.c
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user