Subversion Repositories Kolibri OS

Rev

Rev 853 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 853 Rev 1145
Line 39... Line 39...
39
; C-equivalent of the following code:
39
; C-equivalent of the following code:
40
; for (;;)
40
; for (;;)
41
; {
41
; {
42
;   con_write_asciiz("Enter string (empty for exit): ");
42
;   con_write_asciiz("Enter string (empty for exit): ");
43
;   con_gets2(mycallback,s,256);
43
;   if (!con_gets2(mycallback,s,256)) break;
44
;   if (s[0] == '\n') break;
44
;   if (s[0] == '\n') break;
45
;   con_write_asciiz("You entered: ");
45
;   con_write_asciiz("You entered: ");
46
;   con_write_asciiz(s);
46
;   con_write_asciiz(s);
47
; }
47
; }
48
mainloop:
48
mainloop:
Line 51... Line 51...
51
        push    256
51
        push    256
52
        push    s
52
        push    s
53
        push    mycallback
53
        push    mycallback
54
        call    [con_gets2]
54
        call    [con_gets2]
55
        cmp     [s], 10
55
        test    eax, eax
-
 
56
        jz      done
-
 
57
        cmp     [s], 10
56
        jz      done
58
        jz      done
57
        push    str2
59
        push    str2
58
        call    [con_write_asciiz]
60
        call    [con_write_asciiz]
59
        push    s
61
        push    s
60
        call    [con_write_asciiz]
62
        call    [con_write_asciiz]