Skip to content

title: "ToggleBit" description: TRSE built-in method (from IDE help)


ToggleBit

Systems: MOS6502, M6809
Parameters: a,b,b


Toggles the bit given from parameter 2 at the address in parameter 1 on or off (parameter 3)

Examples

ToggleBit(SPRITE_BITMASK, 3, 0); // Turn off sprite 3 // Loop through all bits for i:=0 to 8 do ToggleBit(my_address, i, val[i]);