Jump to content
IGNORED

GEOS programming question, finding the location of printed text?


Recommended Posts

Hi! Lately I've been trying to get my head around GEOS programming, and I've been having a lot of fun. I ran into a bit of a roadblock - is there any way to get the coordinates of the last word printed to the screen? I've been making a character builder for a tabletop and I think it would be fun if you could click on words in bits of text to pull up the relevant rules. I was gonna make a loop to print word by word and just check if it's printing a keyword. Just curious if there's some easy trick I've been missing out on. I'm working in the Geocom basic compiler if that's relevant but if there's a method in assembly I'm sure I can figure out how to adapt it. Thanks!

  • Like 1
Link to comment
Share on other sites

I may be a little spoiled by google. A little bit of reading between the lines in the hitchhikers guide to GEOS (probably should've just sat down and read that from the start XD) and it turns out you can snoop on the psuedo-registers r11 ($18, 2 bytes) and r1h ($05,1 byte). It scares even me to read registers directly like that but it certainly works. Probably wise to disable interrupts while you do this. May this knowledge serve whatever future wanderer finds this thread on a cold lonely night

  • Like 3
Link to comment
Share on other sites

1 hour ago, SaturnGoddex said:

Looking through it, it doesn't specifically say. It's from 1988 though so I'd imagine 2.0?

Would be right about the same release year.  I have for a long time wanted to do something with GEOS, but like most things, just never have the time.  I read one of the programmer's guides... pretty damn slick what they did in 64k of RAM.

Link to comment
Share on other sites

It's been really fascinating getting up close and personal with it. Like once you consider the GEOS kernel it always keeps loaded and graphics memory your application is working with around 25k I believe? It's really just enough to load and execute code off a disk so you wind up playing this endless juggling game of loading and unloading modules but honestly it works. I can't argue with results, geos on the c64 certainly feels more usable to me than say a 128k macintosh. I suspect part of that is the 6502 having a lot better code density than a 68k, and I'm also pretty sure my opinion might be different if I was running it off an actual 1541 and swapping disks all the time :P

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...