Author Topic: TXT Windows  (Read 436 times)

0 Members and 1 Guest are viewing this topic.

Offline IndyUK

  • CPC464
  • **
  • Posts: 22
  • Country: gb
  • Liked: 3
  • Likes Given: 2
TXT Windows
« on: 23:05, 08 May 21 »
Hi Folks,
I'm experimenting with creating TXT Windows and have used the firmware call &bb66 to create two windows. I now want to swap between them and looking at the manual there is a call &bbb4 that allows this. However, the problem I have is that I need to load the "A" register with the new window's stream number but, I don't know what that is. The create call doesn't return anything to make note of so I have no clue what to use. I tried 0 (zero) thinking it might be in order of creation but that didn't work. I've attached what the screen currently looks like. The text input focus is in the Red window (the last window to be created), I need to move it to the Black one. In BASIC you can use the "#" prefix to denote where the focus needs to be and that works perfectly. Just don't know how to do it in Assembly.
I'm basically converting my BASIC Space Invader game (screenshot attached) over to assembly to see how much speed gain there is and setting up the screen to look exactly the same.
Thanks.

Offline andycadley

  • Supporter
  • 6128 Plus
  • *
  • Posts: 981
  • Liked: 479
  • Likes Given: 81
Re: TXT Windows
« Reply #1 on: 10:14, 09 May 21 »
I think you're supposed to select the stream you want to define before creating the window, otherwise you're just redefining the default #0 stream each time.


Then you can switch between them as and when you like.

Offline IndyUK

  • CPC464
  • **
  • Posts: 22
  • Country: gb
  • Liked: 3
  • Likes Given: 2
Re: TXT Windows
« Reply #2 on: 14:35, 09 May 21 »
I think you're supposed to select the stream you want to define before creating the window, otherwise you're just redefining the default #0 stream each time.


Then you can switch between them as and when you like.
Hi
You were 100% correct.  :doh: I hadn't quite grapsed what the &BBB4 firmware call was actually trying to say. The documentation is not very clear unless you get that sudden light bulb moment (or someone kindly gives you a pointer). The code is working now. I guess it's on we go.

Thanks for your help.