BeagleBone Black GPIO Arm Assembly

Hi everyone.
How to manage GPIO ports using Arm Assembly Language?
I tried using this example (BeagleBone-Black/gpio.s at master · ejanjoh/BeagleBone-Black · GitHub and bbb_wireless/leds.S at master · danghai/bbb_wireless · GitHub) , but I get a “segmentation fault” error. I run program with “as -o blink_leds.o blink_leds.s && ld -o blink_leds blink_leds.o”.
Please tell me how to control GPIO using Arm Assembly Language (enable / disable, read, etc.)?