Hallo,
im folgendem Program bekomme ich einen Stack underflow error im Simulator den ich mir nicht erklären kann.
Ich hoffe das liegt an mir.
Der Error kommt in drt Procedure Letter
[Edit] Titel geändert und verschoben
im folgendem Program bekomme ich einen Stack underflow error im Simulator den ich mir nicht erklären kann.
Ich hoffe das liegt an mir.
Der Error kommt in drt Procedure Letter
Code
Program Test;
{$WG} {global Warnings on}
Device = mega128, VCC = 3.3;
{ $BOOTRST $0F000} {Reset Jump to $0F000}
Define_fuses
// Override_Fuses;
NoteBook = A;
Supply = 5.0, 100;
LockBits0 = [];
FuseBits0 = [];
FuseBits1 = [SPIEN, JTAGEN, OCDEN];
FuseBits2 = [];
FuseBits3 = [];
FuseBits4 = [];
FuseBits5 = [];
FuseBits6 = [];
FuseBits7 = [];
Import SysTick;
From System Import;
Define
ProcClock = 16000000; {Hertz}
SysTick = 10; {msec}
StackSize = $0064, iData;
FrameSize = $0064, iData;
Implementation
{$IDATA}
{--------------------------------------------------------------}
{ Type Declarations }
Type
TCharArr = Array[0..7] Of Byte;
{--------------------------------------------------------------}
{ Const Declarations }
Const
Charset : TCharArr = ($00, $0A, $1F, $0A, $0A, $1F, $0A, $00); //#
{--------------------------------------------------------------}
{ Const Declarations }
{--------------------------------------------------------------}
{ Var Declarations }
{$IDATA}
Var
GX, GY : Byte;
{--------------------------------------------------------------}
{ functions }
Procedure Letter(X : Byte; Y : Byte; VG : Word; HG : Word);
Var
Z : Byte;
Begin
Z := 0;
For GY := 0 To 6 Do
For GX := 0 To 7 Do
If Bit(Charset[GY], GX) Then
//Lcd_Plot(X + Z, Y + GY, VG);
Else
//Lcd_Plot(X + Z, Y + GY, HG);
Endif;
Endfor;
Z := Z + 1;
Endfor;
//LCD_Window(0, 0, Window_Width - 1, Window_Height - 1);
End;
Begin
Letter(10, 10, 0, 0);
End.
Test;
{$WG} {global Warnings on}
Device = mega128, VCC = 3.3;
{ $BOOTRST $0F000} {Reset Jump to $0F000}
Define_fuses
// Override_Fuses;
NoteBook = A;
Supply = 5.0, 100;
LockBits0 = [];
FuseBits0 = [];
FuseBits1 = [SPIEN, JTAGEN, OCDEN];
FuseBits2 = [];
FuseBits3 = [];
FuseBits4 = [];
FuseBits5 = [];
FuseBits6 = [];
FuseBits7 = [];
Import SysTick;
From System Import;
Define
ProcClock = 16000000; {Hertz}
SysTick = 10; {msec}
StackSize = $0064, iData;
FrameSize = $0064, iData;
Implementation
{$IDATA}
{--------------------------------------------------------------}
{ Type Declarations }
Type
TCharArr = Array[0..7] Of Byte;
{--------------------------------------------------------------}
{ Const Declarations }
Const
Charset : TCharArr = ($00, $0A, $1F, $0A, $0A, $1F, $0A, $00); //#
{--------------------------------------------------------------}
{ Const Declarations }
{--------------------------------------------------------------}
{ Var Declarations }
{$IDATA}
Var
GX, GY : Byte;
{--------------------------------------------------------------}
{ functions }
Procedure Letter(X : Byte; Y : Byte; VG : Word; HG : Word);
Var
Z : Byte;
Begin
Z := 0;
For GY := 0 To 6 Do
For GX := 0 To 7 Do
If Bit(Charset[GY], GX) Then
//Lcd_Plot(X + Z, Y + GY, VG);
Else
//Lcd_Plot(X + Z, Y + GY, HG);
Endif;
Endfor;
Z := Z + 1;
Endfor;
//LCD_Window(0, 0, Window_Width - 1, Window_Height - 1);
End;
Begin
Letter(10, 10, 0, 0);
End.
Test;
[Edit] Titel geändert und verschoben
You must be logged in or your permissions are to low to see this Attachment(s).