Ah yes, sorry, I haven't been clear on how I'm actually testing this!
For the moment the co-pro is disabled. I'm assuming that this is meant to be a "universal" way of reading/writing to I/O so it shouldn't matter it there's a co-pro present or not? With that in mind I've only changed one part from the "direct access" method for now - I'll change the whole thing once I've got it working.
Below is the current segment of code:
On running this, input_byte# is zero, but data_ready# is 16777216.
I don't think BASIC and COMAL are hugely different in this regard - variables are lowercase so A# is converted to a# automatically. The example in the COMAL manual also uses lowercase so that is probably OK. I think this is much more a case of me having never done this before and not having a clear example to work off. Everything I've seen so far is "almost" what I'm after, so I've struggling to build understanding from that.
I'll try doing this in BASIC just to see if that makes a difference.
For the moment the co-pro is disabled. I'm assuming that this is meant to be a "universal" way of reading/writing to I/O so it shouldn't matter it there's a co-pro present or not? With that in mind I've only changed one part from the "direct access" method for now - I'll change the whole thing once I've got it working.
Below is the current segment of code:
Code:
321 a#:=&91 322 x#:=1 323 y#:=0 324 input_byte#:=((USR&FFF4) AND &FF0000) DIV &10000 325 data_ready#=((USR&FFF4) AND &1000000) 326 PRINT data_ready#
I don't think BASIC and COMAL are hugely different in this regard - variables are lowercase so A# is converted to a# automatically. The example in the COMAL manual also uses lowercase so that is probably OK. I think this is much more a case of me having never done this before and not having a clear example to work off. Everything I've seen so far is "almost" what I'm after, so I've struggling to build understanding from that.
I'll try doing this in BASIC just to see if that makes a difference.
Statistics: Posted by dhoggan — Thu May 30, 2024 11:12 pm