;//########################################################################### ;// ;// FILE: F2838xD_TestAndSet.asm ;// ;// Titov L.A. ;// ;// ;//########################################################################### ;D .text .global _test_and_set_bit .global _test_and_set_bit_1 ;Input: volatile uint16_t * - AR4 (on low 16 bit address space) ;Output: uint16_t - AL (return value) _test_and_set_bit: TSET *AR4,#0 ;Test and set specified bit, read-modify-write operation. MOVB AL,#0 MOVB AL,#1,TC LRETR _test_and_set_bit_1: TSET *AR4,#1 ;Test and set specified bit, read-modify-write operation. MOVB AL,#0 MOVB AL,#1,TC LRETR ;// ;// End of file. ;//