Okay, so in assembly, for certain tasks, it's really convenient when you've got a port setup as all outputs, to be able to send an 8bit number to the PORT register and do all your output in one command. In GCBASIC I can use the Set command but that only allows me to set a bit at a time, which means many repeated commands. Is there a way to shift a byte straight to a PORT register? the DIR command can be used to do this in entire port mode for the tristate register but what if we want to do it to output more efficiently? Is this possible?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ah. I see the POKE command can be used but there's no way to do this at a higher level. You can't just specify "PORTB" to poke, you have to know the exact memory position for the chip.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Okay, so in assembly, for certain tasks, it's really convenient when you've got a port setup as all outputs, to be able to send an 8bit number to the PORT register and do all your output in one command. In GCBASIC I can use the Set command but that only allows me to set a bit at a time, which means many repeated commands. Is there a way to shift a byte straight to a PORT register? the DIR command can be used to do this in entire port mode for the tristate register but what if we want to do it to output more efficiently? Is this possible?
I also notice that there's no way to use DIR in Entire Port Mode unless you switch to text editing.
Ah. I see the POKE command can be used but there's no way to do this at a higher level. You can't just specify "PORTB" to poke, you have to know the exact memory position for the chip.
You can treat the ports like variables. Try this:
Ah, thanks!