gets(s, z) { i; while(1) { if (i >= z-1) break; c = getc(); if (c < 0 || c == '\n') break; s[i++] = c; } s[i] = 0; return s; } getc() { c; asm("in {c}"); return c; } putc(c) { asm("out {c}"); } putd(n) { asm("mov {n} Z"); } puts(s) { for (i=0;s[i];i++) putc(s[i]); } nl() { putc('\n'); }