Path: chuka.playstation.co.uk!news From: "Steve Dunn" Newsgroups: scea.yaroze.programming.codewarrior,scee.yaroze.programming.codewarrior Subject: Re: C++ and 'exit' Date: Wed, 18 Mar 1998 16:44:37 -0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 72 Message-ID: <6eotn2$l5r3@chuka.playstation.co.uk> References: <6e9fbt$6nq7@chuka.playstation.co.uk> <6eluo8$dud31@chuka.playstation.co.uk> <01bd51fd$313255c0$54d449c2@Angela1.intelligent-group.com> NNTP-Posting-Host: userm349.uk.uudial.com X-Newsreader: Microsoft Outlook Express 4.72.2106.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Xref: chuka.playstation.co.uk scea.yaroze.programming.codewarrior:304 scee.yaroze.programming.codewarrior:202 Cheers Craig, >BTW. Steve, if you'd actually looked in the ARS library, the actual Action >Replay >comm channel access is done using assembler functions - you could have >ripped >the syntax from there (or from _psstart.c in fact). I did, but couldn't find 'break' and had no Idea that it should have been 'breakc'. Thanks again. Steve >Joel has done a funny here, his code fragment is from GNU C, not CW :) > >The correct code for CW on Yaroze is: > >asm void exit(void) >{ > breakc 0x8201 > nop >} > >BTW. Steve, if you'd actually looked in the ARS library, the actual Action >Replay >comm channel access is done using assembler functions - you could have >ripped >the syntax from there (or from _psstart.c in fact). > >Craig. > >Steve Dunn wrote in article ><6eluo8$dud31@chuka.playstation.co.uk>. .. >> I tried that and I got... >> asm{"break 0"}; >> 'Error: end of line expected' with >> the underscore under after the first >> opening brace. >> >> Cheers >> >> Steve >> >The "exit()" method isn't supported in >> the PlayStation libraries. You can >> >call it but it will just crash your >> program (though, you may want this in >> >an Assert). Otherwise, just write your >> own such as >> > >> >void exit(int code) >> >{ >> > printf("Exit called with code %i! >> Program halted.\n",code); >> > asm{"break 0"}; >> >} >> > >