github.com/HACKERALERT/Picocrypt/src/external/sys@v0.0.0-20210609020157-e519952f829f/windows/svc/sys_windows_arm64.s (about) 1 // Copyright 2018 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 #include "textflag.h" 6 7 // func servicemain(argc uint32, argv **uint16) 8 TEXT ·servicemain(SB),NOSPLIT|NOFRAME,$0 9 MOVD R0, ·sArgc(SB) 10 MOVD R1, ·sArgv(SB) 11 12 MOVD ·sName(SB), R0 13 MOVD ·ctlHandlerExProc(SB), R1 14 MOVD $0, R2 15 MOVD ·cRegisterServiceCtrlHandlerExW(SB), R3 16 BL (R3) 17 CMP $0, R0 18 BEQ exit 19 MOVD R0, ·ssHandle(SB) 20 21 MOVD ·goWaitsH(SB), R0 22 MOVD ·cSetEvent(SB), R1 23 BL (R1) 24 25 MOVD ·cWaitsH(SB), R0 26 MOVD $-1, R1 27 MOVD ·cWaitForSingleObject(SB), R2 28 BL (R2) 29 30 exit: 31 RET