Issues

Select view

Select search mode

 
50 of 252

Deduplicate strings used in TELL

Description

One way to save text space, without relying on the abbreviation algorithm, is to move strings that are printed more than once into constants, changing PRINTI instructions into PRINTs:

becomes

This would be easy to do automatically - it's mostly just a matter of finding the right place in the build process to do it.

Details

Assignee

Reporter

Components

Priority

Affects versions

Created February 10, 2021 at 7:42 AM
Updated February 13, 2021 at 1:15 PM

Activity

Tara J. McGrewFebruary 13, 2021 at 1:15 PM

Only the limited number of global variable slots. Some games have plenty to spare; others have so many globals that they have to spill out into arrays.

If a game isn’t using all the available globals, any constant that’s used more than twice could safely be moved into a global to save space, I think. Besides saving a byte in the operand itself, that would also allow some 2OP instructions to be assembled in long form instead of variable form, saving another byte per instruction.

Henrik ÅsmanFebruary 12, 2021 at 9:33 PM

Using GLOBALs instead of CONSTANTs will save an additional byte per PRINT. Is there any downside to this?

Flag notifications