Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sprites like MJ's Trabajo Basura (not unregr. Fourspriter)
#14
AlcoholicsAnonymous Wrote:
britlion Wrote:Nope. Not even that much of proto-object oriented programming. More or less Sinclair Basic and raw assembly only - or any library subroutines that can be made from that.

I did read in another thread some qualms about introducing pointers and struct like things but I do think this is something that has to happen in zxbasic to make it a better language -- without them it makes it difficult to do certain things. The concept of a pointer can be hidden from the programmer by using references for non-native types as is done in Java and other languages that try to insulate the programmer from the machine. Boriel will be doing exactly that with Arrays for passing Arrays to functions.
That's the idea. I always though Basic should not mimic C (there are several threads about this topic), or we'll end up with "C with BASIC keywords" instead of a BASIC language. I use pointers for example for referenced variables (ByRef).

I also think structs should be a plus, but I haven't yet figured out how to implement them efficiently in a so limited machine: na_th_an suggested using IY+n scheme to reference struct fields, but IY is used by the TIMER interrupt routine. Sad I could disable it, but this will break compatibility with many BASIC programs which already work with the compiler: <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Clock.Bas">http://www.boriel.com/wiki/en/index.php ... :Clock.Bas</a><!-- m -->
How did you implement structs?

Using IY would be nice. I'm thinking in relocating TIMER routine into RAM and free IY regs. (or just use something like PUSH IY, call DI routine, DI, POP IY, EI, RET).

Suggestions from anybody are welcome. Any ideas :?:
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)