-write_char:
-lodsb ; al = [ds:si], si += 1
-or al, al ; on null terminator,
-jz halt ; halt
-stosw ; [es:di] = ax, di += 2
-jmp write_char
+mov ah, PRINT_COLOR ; ah = color attribute
+
+mov cx, COLS * ROWS ; for each cell
+
+.print_cell: ; do {
+
+ lodsb ; al = [ds:(si++)]
+ stosw ; [es:di] = ax ; di += 2
+
+ loop .print_cell ; } while (--cx)
+
+mov es, cx ; es = 0
+ret
+
+; halt() - stop program execution ---------------------------------------------