2 ; Ullrich von Bassewitz, 2003-04-13
4 ; int write (int fd, const void* buf, int count);
6 ; This function is a hack!
11 .importzp ptr1, ptr2, ptr3, tmp1
18 sta ptr3+1 ; save count as result
24 sta ptr2+1 ; Remember -count-1
29 jsr popax ; get fd and discard
37 cpx #$0A ; Check for \n
47 ; No error, return count