Skip to content

Commit

Permalink
fix error for djgpp-dos; update RHIDE project files & fix crash on -O…
Browse files Browse the repository at this point in the history
…2 (djgpp-dos), experiment -O2 (-O2 not working for djgpp-dos).
  • Loading branch information
crazii committed Feb 27, 2024
1 parent e5da61b commit 65ab7da
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
15 changes: 7 additions & 8 deletions hdpmipt.c
Expand Up @@ -124,27 +124,26 @@ static uint32_t HDPMI_Internal_InstallTrap(const HDPMIPT_ENTRY* entry, int start
{
uint32_t handle = 0;
int count = end - start + 1;
const HDPMIPT_ENTRY ent = *entry; //avoid gcc using ebx
asm(
"pushl %%ebx \n\t"
"pushl %%esi \n\t"
"pushl %%edi \n\t"
"movl %1, %%esi \n\t" //ESI: starting port
"movl %2, %%edi \n\t" //EDI: port count
"pushl %1 \n\t pushl %2 \n\t" //"movl %1, %%esi \n\t" //ESI: starting port
"popl %%edi \n\t popl %%esi \n\t" //"movl %2, %%edi \n\t" //EDI: port count
"xor %%ecx, %%ecx \n\t"
"mov %%cs, %%cx \n\t" //CX: handler code seg
"xor %%ebx, %%ebx \n\t"
"mov %%ds, %%bx \n\t" //BX: handler data seg
"movl %3, %%edx \n\t" //EDX: handler addr
"movl $6, %%eax \n\t" //ax=6, install port trap
"lcall *%4\n\t"
"jc 1f \n\t"
"movl %%eax, %0 \n\t"
"1: popl %%edi \n\t"
"popl %%edi \n\t"
"popl %%esi \n\t"
"popl %%ebx \n\t"
:"=m"(handle)
:"m"(start),"m"(count),"m"(handler),"m"(ent)
"jc 1f \n\t"
"movl %%eax, %0 \n\t 1:"
:"=g"(handle)
:"g"(start),"g"(count),"g"(handler),"m"(*entry)
:"eax","ebx","ecx","edx","memory"
);
return handle;
Expand Down
2 changes: 1 addition & 1 deletion mpxplay/au_cards/au_base.c
Expand Up @@ -97,7 +97,7 @@ _go32_dpmi_seginfo old_addr = intaddr_go32[intno];
{
intaddr_go32[intno].pm_selector = vect.sel;
intaddr_go32[intno].pm_offset = vect.off;
_go32_interrupt_stack_size = 4096; //512 minimal
//_go32_interrupt_stack_size = 4096; //512 minimal
if(_go32_dpmi_allocate_iret_wrapper(&intaddr_go32[intno]) != 0)
return;
_go32_dpmi_set_protected_mode_interrupt_vector(intno, &intaddr_go32[intno]);
Expand Down
2 changes: 1 addition & 1 deletion mpxplay/au_cards/au_cards.c
Expand Up @@ -465,7 +465,7 @@ void AU_init(struct mpxplay_audioout_info_s *aui,struct mpxplay_audioout_info_s
aui->freq_card=aui->chan_card=aui->bits_card=0;
return;

err_out_auinit:
err_out_auinit:;
#ifndef SBEMU
#ifdef MPXPLAY_GUI_CONSOLE
mpxplay_close_program(error_code);
Expand Down
Binary file modified sbemu.gdt
Binary file not shown.
Binary file modified sbemu.gpr
Binary file not shown.

0 comments on commit 65ab7da

Please sign in to comment.