Download Pelles C here: http://www.pellesc.se
NULL equ 0
MB_OK equ 0
EXIT_SUCCESS equ 0
area .rdata, data, readonly
message dcb "Hello, Windows on ARM64!", 0
title dcb "POASM test", 0
area .text, code
export main
import __imp_ExitProcess
import __imp_MessageBoxA
main function
stp fp,lr,[sp,#-16]!
mov fp,sp
mov x0,NULL
adrp x1,message
add x1,x1,message
adrp x2,title
add x2,x2,title
mov w3,MB_OK
adrp x8,__imp_MessageBoxA
ldr x8,[x8,__imp_MessageBoxA]
blr x8
mov w0,EXIT_SUCCESS
adrp x8,__imp_ExitProcess
ldr x8,[x8,__imp_ExitProcess]
blr x8
ldp fp,lr,[sp],#16
ret
endfunc
end
int main(void) {
MessageBoxA(NULL, "Hello, Windows on ARM64!", "POASM test", MB_OK);
ExitProcess(EXIT_SUCCESS);
}
include OpenNewTxtForOutput.inc
.data
msg db 'This is a test.',0
msg2 db 'Another test',0
file db 'Test.txt',0
.data?
hFile dd ?
.code
OpenNewTxtForOut PROC filename:DWORD
LOCAL mode:DWORD
mov mode,'w'
invoke fopen,filename,\
ADDR mode
ret
OpenNewTxtForOut ENDP
put PROC handle:DWORD,pMemory:DWORD
invoke lstrlen,pMemory
invoke fwrite,pMemory,1,\
eax,handle
ret
put ENDP
close PROC handle:DWORD
invoke fclose,handle
ret
close ENDP
start:
invoke OpenNewTxtForOut,ADDR file
mov hFile,eax
invoke put,eax,ADDR msg
invoke put,hFile,ADDR msg2
invoke close,hFile
invoke ExitProcess,0
END start
Quote from: John Z on March 28, 2026, 10:56:36 AMDownloaded n3220 working draft.Thanks for looking at this! Glad it's not just me, then...
Problem is not your English - it is the inconsistency in the proposed spec.
Page created in 0.066 seconds with 15 queries.