I'm converting an old Basic Stamp 2 program to ZX24 and it uses a Reverse statement to change the state of a pin without querying it first.
Is there a ZX equivelant ? I can think of a few one line ways of doing it but what is the most efficient method ?
Is there an equivelant to BS2 Reverse statement
Re: Is there an equivelant to BS2 Reverse statement
There is no direct equivalent. The method suggested in the PBasic Conversion document is this:FFMan wrote:Is there a ZX equivelant ?
Code: Select all
Sub Reverse(ByVal pin as Byte)
Call SetBits(Register.DDR(pin), PortMask(pin), Not Register.DDR(pin))
End Sub
- Don Kinzer