Path: chuka.playstation.co.uk!news From: Chris Chadwick Newsgroups: scee.yaroze.programming.libraries Subject: Re: SsVabTransfer locks up! Date: Wed, 15 Jul 1998 01:00:28 -0700 Organization: PlayStation Net Yaroze (SCEE) Lines: 43 Message-ID: <35AC619C.3A76@dial.pipex.com> References: <359E82E9.1134@dial.pipex.com> <35a17582.898850637@news.scea.sony.com> <35A5E635.6368@dial.pipex.com> NNTP-Posting-Host: userl257.uk.uudial.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.02 (Win95; I; 16bit) Chris Chadwick wrote: > > Jamin Frederick wrote: > > How do you set up a stack in the DCache? > > I have a short bit of inline assembler code that I got > from another Yaroze member's web site... trouble is, this > was about a year ago and I cant remember who wrote > it (many apologies to the author)! > If you have trouble getting it, e-mail me and I'll send it > to you. It's very short - about 6-8 lines. > > -Chris Update: this is the code (actually only 3 lines of assembler!) //*------------------------------------------------------------------------------------------ //* main - stub to implement DCache stack //*------------------------------------------------------------------------------------- long savesp; int main() { //* Change SP to scratchpad area... __asm__ volatile ("sw $29,(savesp)"); __asm__ volatile ("la $29,0x1f8003f0"); //* Run program... MainProper(); //* Restore SP... __asm__ volatile ("lw $29,(savesp)"); return 0; } Now, I dont know much about this inline assembler stuff but the above code (now that I look at it!) seems to be setting the stack pointer register to the BOTTOM of the DCache memory. I'd assumed the stack would 'grow' downwards in memory, not up. This has probably got little to do with my original problem of SsVabTransfer locking up which I REALLY want to solve but... Ideas, anyone? -Chris