eWON.biz
Knowledge Base

Latest changes
eWON wiki > eWON Support > Knowledge Base > Questions and Answers > Program.bas use more space than program size

Program.bas use more space than program size

From $1

Table of contents

 

Why put a program.bas of 80kB in an eWON will left only 26kB of Free Memory (instead of 48kB)?

The fact:
With an eWON with an empty program (init and cyclic defined but empty), the Free Prog. Mem shows 130547 bytes left.
When you put a program.bas of 81300 bytes on this eWON, the Free Prog. Mem shows now 27855
Then, where are the 21392 bytes  = (130547 - 81300 - 27855)

Answer

When a program is loaded on eWON, the eWON doesn't store it as-is, eWON process the program to a faster interpretation.
And you need to add an overhead by line and by label.

Each basic line:  add 7 bytes
Each label defined:  add 8 bytes + label length