S65-Display/Display3000

Stack underflow?

  • 1
  • 2
  • 3
  • 5
  • 6
  • 7
  • Page 2 of 7
wilbo
Benutzer
Avatar
Gender:
Age: 68
Posts: 27
Registered: 11 / 2023
Subject:

Re: Stack underflow?

 · 
Posted: 15.04.2024 - 13:54  ·  #9
Hallo Merlin,
so funktioniert es, vielen herzlichn Dank.

Aber wenn ich GY auf LY umstelle erhalte ich unten stehende Fehlermeldung.
Damit kann ich aber leben:-) bleibt es erstmal Global

Hello Merlin,
that's how it works, thank you very much.

But when I change GY to LY I get the error message below.
But I can live with that:-) it remains Global for now


Code
Procedure Letter(X : Byte; Y : Byte; VG : Word; HG : Word);
Var
  Z,LX,LY   : Byte;
Begin
  Z := 0;
  For LY := 0 To 6 Do
    For GX := 0 To 7 Do
      If Bit(Charset[LY], GX) Then // Line 66
        //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;



[Window Title]
Error

[Content]
internal compiler error "Range check error"
Line: 66 file: F:\AVRPROJEKTE\DISP3000\Disp3000.pas

[Abort]
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1373
Registered: 03 / 2005
Subject:

Re: Stack underflow?

 · 
Posted: 15.04.2024 - 15:10  ·  #10
I will look into that Wilbo.
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1373
Registered: 03 / 2005
Subject:

Re: Stack underflow?

 · 
Posted: 15.04.2024 - 15:48  ·  #11
Fix attached.
You must be logged in or your permissions are to low to see this Attachment(s).
wilbo
Benutzer
Avatar
Gender:
Age: 68
Posts: 27
Registered: 11 / 2023
Subject:

Re: Stack underflow?

 · 
Posted: 16.04.2024 - 18:35  ·  #12
Hallo Merlin,
leider konnte ich den letzen Fix erst jetzt runterladen. Das Forum war zumindest Heute bis jetzt nicht erreichbar aber ich gebe dir zeitnah eine Rückmeldung. wird aber heute nicht mehr klappen.
Gruß wilbo

Hello Merlin,
unfortunately I was only able to download the latest fix now. The forum was not available at least today but I will give you a feedback as soon as possible. but it will not work today.
Greetings wilbo
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1373
Registered: 03 / 2005
Subject:

Re: Stack underflow?

 · 
Posted: 16.04.2024 - 19:48  ·  #13
No problem Wilbo. Thank you.
wilbo
Benutzer
Avatar
Gender:
Age: 68
Posts: 27
Registered: 11 / 2023
Subject:

Re: Stack underflow?

 · 
Posted: 17.04.2024 - 13:39  ·  #14
Hallo Merlin,

jetzt geht es auch mit Lokalen variablen super. Da die Function BIT nicht mit Charset[Y] funktioniert (liefert nur False) habe ich die Variable LC als zwischenspeicher eingeführt und jetzt habe ich den ersten Buchstabe auf meinem Display:-)

Vielen Dank für deine Bemühungen!!!!

Hello Merlin,

now it also works great with local variables. Since the function BIT does not work with Charset[Y] (only returns False) I have introduced the variable LC as a buffer and now I have the first letter on my display:-)

Many thanks for your efforts!!!!

Code
Procedure Letter(X : Byte; Y : Byte; VG : Word; HG : Word);
Var
  Z,LX,LY,LC   : Byte;
Begin
  Z := 0;
  For LY := 0 To 7 Do
    For LX := 0 To 7 Do
      LC := Charset[LY];
      If Bit(LC, LX) Then
        Lcd_Plot(X + LX, Y + LY, VG);
      Else
        Lcd_Plot(X + LX, Y + LY, HG);
      Endif;
    Endfor;
    Z := Z + 1;
  Endfor;
  LCD_Window(0, 0, Window_Width - 1, Window_Height - 1);
End;
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1373
Registered: 03 / 2005
Subject:

Re: Stack underflow?

 · 
Posted: 17.04.2024 - 19:30  ·  #15
Hi Wilbo.

I think that Bit was never designed to work with constant array, because it is stored in ROM. It might work better with with structconst, which is stored in RAM. I will look at it again and see if I can see a solution. If not I will try adding an an error message.

Ich denke, dass Bit nie für die Arbeit mit Constant Array konzipiert wurde, weil es im ROM gespeichert ist. Es könnte besser mit structconst funktionieren, das im RAM gespeichert ist. Ich werde es mir noch einmal ansehen und sehen, ob ich eine Lösung finde. Wenn nicht, werde ich versuchen, eine Fehlermeldung hinzuzufügen.
wilbo
Benutzer
Avatar
Gender:
Age: 68
Posts: 27
Registered: 11 / 2023
Subject:

Re: Stack underflow?

 · 
Posted: 17.04.2024 - 19:53  ·  #16
Hallo Merlin,
ich könnte mit dieser zusätzlichne zuweisung leben, aber du hast recht eine Fehlermeldung wäre nicht schlecht.
Gruß wilbo

Hello Merlin,
I could live with this additional assignment, but you are right, an error message would not be bad.
Greetings wilbo
  • 1
  • 2
  • 3
  • 5
  • 6
  • 7
  • Page 2 of 7
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   137   151 · Page-Gen-Time: 0.023718s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI