Enterprise Forever

:UK => Programming => Topic started by: Zozosoft on 2023.December.12. 21:35:25

Title: SUDOKU Solver in IS-BASIC
Post by: Zozosoft on 2023.December.12. 21:35:25
Thanks!

I've almost finished the IS-BASIC versiĆ³n but the execution is tremendously slow.
You can try to compile with Zzzip. (http://enterprise.iko.hu/books/Zzzzip_Compiler.pdf) (But it has a few limitations.)
Title: Re:SUDOKU Solver in IS-BASIC
Post by: nicalejo on 2023.December.12. 21:46:06
Yes, I know it, but taking profit of the structured basic capabilities I filled all the procedures with local variables. This is something that needs to be changed with Zzzip. Once the basic code is finished I'l try to change all this stuff in order to zzzip can compile the code.

Thanks
Title: Re:SUDOKU Solver in IS-BASIC
Post by: szipucsu on 2023.December.13. 12:08:38
Zzzip may compile programs with local variables too. It doesn't always cause problems, I think. You can try it.
Title: Re:SUDOKU Solver in IS-BASIC
Post by: SlashNet on 2023.December.13. 14:41:17
Zzzip may compile programs with local variables too. It doesn't always cause problems, I think. You can try it.

If I not mistaken, Zzzzip doesn't like same names of local and global variables.
Title: Re:SUDOKU Solver in IS-BASIC
Post by: nicalejo on 2023.December.13. 18:12:26
Yes, I've to rename all the local variables coincident in name. Not a big work but I let it until finished.

Thanks
Title: Re:SUDOKU Solver in IS-BASIC
Post by: nicalejo on 2023.December.15. 04:08:32
As I told before, here is basic version of the program . It is extremely slow. I checked it in the emulator using the full speed option.

I had several comments in source using the character ! and almost finishing the code gave me always a runtime error "Insuficient memory". That took me crazy. Once removed the comments everything is ok. Maybe a bug in the basic or the vi editor writing some extrange character with the !

Anyway here it is

[attachmini=1]
[attachmini=2]
Title: Re: SUDOKU Solver in IS-BASIC
Post by: geco on 2023.December.15. 08:26:59
you could try to keep everything in one page with PRINT AT, i think it would save also memory.
Title: Re: SUDOKU Solver in IS-BASIC
Post by: nicalejo on 2023.December.15. 10:31:20
Just a dozen of comments made the execution crash. I cleaned all and works. Maybe the vi editor under Macos (I used it) inserted something abnormal for the basic interpreter.