35 lines
912 B
Text
35 lines
912 B
Text
option casemap:none
|
|
|
|
printf proto :qword, :vararg
|
|
exit proto :dword
|
|
;; curses.h stuff
|
|
initscr proto ;; WINDOW *initsrc(void);
|
|
endwin proto ;; int endwin(void);
|
|
start_color proto ;; int start_color(void);
|
|
wrefresh proto :qword ;; int wrefresh(WINDOW *w);
|
|
wgetch proto :qword ;; int wgetch(WINDOW *w)
|
|
waddnstr proto :qword, :qword, :dword ;; int waddnstr(WINDOW *w, const char *str, int n);
|
|
;; Just a wrapper to make printing easier..
|
|
println proto :qword, :qword
|
|
|
|
.code
|
|
main proc
|
|
local stdscr:qword
|
|
|
|
call initscr
|
|
mov stdscr, rax
|
|
call start_color
|
|
invoke println, stdscr, CSTR("Goodbye, World!",10)
|
|
invoke wgetch, stdscr
|
|
call endwin
|
|
invoke exit, 0
|
|
ret
|
|
main endp
|
|
|
|
println proc wnd:qword, pstr:qword
|
|
invoke waddnstr, wnd, pstr, -1
|
|
invoke wrefresh, wnd
|
|
ret
|
|
println endp
|
|
|
|
end
|