[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Missing clobbered register in gemlib
Am 20.12.2009, 13:15 Uhr, schrieb Helmut Karlowski  
<helmut.karlowski@ish.de>:
What is wrong with this:
#include <stdio.h>
#include <gem.h>
short work_in[16], work_out[57], vdi_handle;
int main(int argc, char *argv[])
{
  work_in[6] = work_in[2] = work_in[4] = work_in[6] = work_in[7] = 1;
  work_in[10] = 2;  /* use rc-coordinates !?!*/
  work_in[0] = 1;  /* act. screen */
  v_opnwk( work_in, &vdi_handle, work_out );
  if( vdi_handle > 0 )
  {
    v_clswk( vdi_handle );
    return 0;
  }
  else
  {
    fprintf( stderr, "could not open physical workstation: handle=%d\n",  
vdi_handle );
    return 1;
  }
}
This causes
pid  11 (a): BUS ERROR: User PC=E00EC2, Address: E000FC (basepage=11A4000,  
text=11A4100, data=11B91C
C, bss=11B9B40)
if run from aranym-console (no XaAES).
Compiled with gcc 2.95.3 -lgem (no mshort). With and without latest  
gemlib-patch.
Runs fine if compiled with pure-c.
-Helmut