mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-07-27 00:46:22 +02:00

- Removed unused/outdated stuff from libndsfpc + Added new examples for libndsfpc + Added working (I hope so...) makefile.fpc for all libndsfpc/libgbafpc examples git-svn-id: trunk@13217 -
26 lines
664 B
ObjectPascal
26 lines
664 B
ObjectPascal
program main;
|
|
|
|
{$apptype arm9}
|
|
{$mode objfpc}
|
|
|
|
uses
|
|
ctypes, nds9;
|
|
|
|
// The default exception handler displays the exception type - data abort or undefined instruction
|
|
// you can relate the exception to your code using arm-eabi-addr2line -e <elf file> <address>
|
|
// assuming you built with debug info this will display a source file and a line number
|
|
// The address of the instruction is shown as pc, beside the address which faulted
|
|
// the rest of the screen is a dump of the registers.
|
|
|
|
begin
|
|
// install the default exception handler
|
|
defaultExceptionHandler();
|
|
|
|
// generate an exception
|
|
pu32(250)^ := 100;
|
|
|
|
while true do
|
|
swiWaitForVBlank();
|
|
|
|
end.
|