1

I'm following the tutorial here. What I'm doing is to simply print out a string but it is giving me an overflow error:

#include <stdio.h>

int main(){
    printf("Hello World\n");
    return 0;
}

enter image description here

I'm compiling the C code with z88dk into a .83p file and loaded it into a TI-83p. I ran it with Doors CS7.2.

Derek 朕會功夫
  • 92,235
  • 44
  • 185
  • 247
  • What if you made `main` a `void` method like in the tutorial? Not sure why that would solve anything, but just an observation. – pushkin Dec 03 '15 at 03:41
  • @Pushkin Same. It's still showing the error. – Derek 朕會功夫 Dec 03 '15 at 03:46
  • 1
    [Maybe `printf` overflows the stack](http://processors.wiki.ti.com/index.php/Tips_for_using_printf#Stack_Size)? What is the assembly? Does `puts` cause the same error? – Cornstalks Dec 03 '15 at 04:04
  • @Cornstalks That is what I thought, but apparently after I tried removing the printf completely something is still causing the error. Probably the problem lies somewhere in the compilation process. – Derek 朕會功夫 Dec 03 '15 at 04:10
  • There's a big difference between the code linked and your code which is the linked code dose not return, but instead loops forever in a while(1) which could be an issue depending on how the calculator handles main returns. – Dom Dec 03 '15 at 08:05
  • 2
    That's a tutorial for the TI 83 (not plus), if you use that on a TI-83+, well, I'm amazed it even get that far – harold Dec 03 '15 at 19:56
  • 1
    Does it error when you run it without the shell, using `Asm([program name]` from the homescreen? – lirtosiast Dec 03 '15 at 22:10
  • 2
    As @Cornstalks asked, what is the assembly it is outputting? If you can't get assembly, even the hex would be useful. – fuzzything44 Dec 14 '15 at 16:07

0 Answers0