SDFM_CONROL_TEAST_EFC/EFC_PlatformC28x/F2838xD_TestAndSet.asm
2024-10-11 09:35:38 +03:00

30 lines
647 B
NASM
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;//*##########################################################################
;//
;// \FILE F2838xD_TestAndSet.asm
;// \project EFC_PlatformC28x
;// \date 10 мая 2024 г.
;// \author Titov L.A.
;//
;// \breif Test of make-run-read-modify-write(bit) atomic operation
;//
;//###########################################################################
;D
.text
.global _test_and_set
;Input: volatile uint16_t * - AR4 (on low 16 bit address space)
;Output: uint16_t - AL (return value)
_test_and_set:
TSET *AR4,#0 ;Test and set specified bit, read-modify-write operation.
MOVB AL,#0
MOVB AL,#1,TC
LRETR
;//
;// End of file.
;//