bhelf@athena.mit.edu (Bill Helfinstine) (01/17/91)
In article <3960@ns-mx.uiowa.edu> mford@umaxc.weeg.uiowa.edu (Mark Ford) writes: >I am writing my first (small) application in Geos, using GeoProgrammer. >I want to ask for input from within a Dialog Box. I can print text >within the Dialog Box just fine, (using DBTXTSTRING) but when I try to >get input, (using DBGETSTRING) garbage appears on the screen and the system >locks up! > >The code looks something like this: > >LoadW r0,#DBOX >LoadW r5,#InBuffer >jsr DoDlgBox > > >DBOX: > .byte stuff > .byte stuff > .byte DBGETSTRING > .byte 80 ;x-position > .byte 60 ;y-position > .byte 5 ;register #5 holds buffer <-------+ > .byte 6 ;max chars = 6 | > .byte NULL | > | >InBuffer: | > .byte 0,0,0,0,0,0 | > | | +-------------------------------------------------------------------+---------+ |Ah hah! You have just fallen victim to one of the bugs in the GEOS | |Programmer's Reference Guide. They made a very big point of describing how | |you must use the number 5 to signify r5, when that is completely wrong. You | |must give it the register's address, rather than its number, like | | | | .byte r5 ;resister r5 holds buffer | | ;so get it right, Berkeley | | | |I think this is all that is wrong (my refrences are at home). | +-----------------------------------------------------------------------------+ >Mark >mford@umaxc.weeg.uiowa.edu Bill bhelf@athena.mit.edu