uli / basicengine-firmware

BASIC Engine Firmware
78 stars 16 forks source link

SAVE PCX command not respecting POS and SIZE parameters and always errors but still saves image file #18

Closed bitartrate closed 4 years ago

bitartrate commented 4 years ago

Hello Uli, From handbook: SAVE PCX image$ [POS x, y] [SIZE w, h]

Whether executed from user space or within a program SAVE PCX ignores parameters and copies the whole screen. It errors with "Syntax error (exp command)" but still saves the image file.

Also, the command does not follow Engine BASIC conventional syntax. It will work as: SAVE PCX "image.pcx",POS x,y SIZE w,h or SAVE PCX"image.pcx",x,y,w,h

But not the conventional: SAVE PCX "image.pcx" POS x,y SIZE w,h

Thank you!

konimaru commented 4 years ago

The syntax error happens because command consumption stops at the first comma after the filename. IOW the save command is simply done without POS/SIZE. The issue will be sorted with pull request #20 (or for now from my fork).

bitartrate commented 4 years ago

Great job Marko! I have compiled your fork and verified that SAVE PCX now works as intended. Thank you.

uli commented 4 years ago

Please do not close bugs until they have been fixed and tested in this repository.

uli commented 4 years ago

Does this work now?

bitartrate commented 4 years ago

This does work as expected. Closing topic. Thank you.