%.o: %.asm
../../utils/binutils/sasm -I$(SRCDIR)/../../lib/crt/include -l $*.lst -o $@ $<
+
+#%.asm: %.c
+# ../../utils/cc/scc -S -o $@ $<
mov bx, offset _msg_hello
call _writestr
+.L1:
+
+ mov ah, HEX (02)
+ mov dl, 'A'
+ int HEX (21)
+
+ jmp .L1
+
; mov bp, sp
;
; mov ax, bp
; call _writehex
; call _crlf
- mov ax, HEX (4B01)
- mov bx, offset _param_blk
- mov dx, offset _app_name
- int HEX (21)
+; mov ax, HEX (4B01)
+; mov bx, offset _param_blk
+; mov dx, offset _app_name
+; int HEX (21)
; mov ah, HEX (62)
; int HEX (21)
--- /dev/null
+/******************************************************************************
+ * @file hello.c
+ *****************************************************************************/
+/*asm (
+
+ "_start:\n"
+ "xor bp, bp\n"
+ "push bp\n"
+ "mov bp, sp"
+
+);*/
+
+//asm inline ".ret:\n";
+//asm inline "ret\n";
+
+/*asm volatile (
+ "push bp\n"
+ "mov bp, sp\n"
+);*/
+
+unsigned char a;
+unsigned short b;
+unsigned int c;
+
+unsigned char *abc;
+//unsigned long d;
+
+//extern void b ();
+static void dead_code () {}
+
+int main (argc, argv) {
+}
+++ /dev/null
-/******************************************************************************
- * @file hello.c
- *****************************************************************************/
-int main (int argc, char **argv) {
- return 0;
-}
push ax
+ call _check_handle_break
+ jnc _int21_02.write
+
+ mov al, '^'
+ call _writechr
+
+ mov al, 'C'
+ call _writechr
+
+ mov al, HEX (0D)
+ call _writechr
+
+ mov al, HEX (0A)
+ call _writechr
+
+ pop ax
+ jmp _spawn_int23
+
+_int21_02.write:
+
mov al, dl
call _writechr
_int21_09.loop:
+ call _check_handle_break
+ jnc _int21_09.print
+
+ mov al, '^'
+ call _writechr
+
+ mov al, 'C'
+ call _writechr
+
+ mov al, HEX (0D)
+ call _writechr
+
+ mov al, HEX (0A)
+ call _writechr
+
+ pop si
+ pop ax
+ jmp _spawn_int23
+
+_int21_09.print:
+
lodsb
cmp al, '$'
% define HEX(y) 0x##y
%endif
+;******************************************************************************
+; @function _check_handle_break
+;******************************************************************************
+global _check_handle_break
+_check_handle_break:
+
+ push es
+ push bx
+ push ax
+
+ xor bx, bx
+ mov es, bx
+ mov bx, HEX (0471)
+
+ mov al, es:[bx]
+
+ and al, HEX (80)
+ jnz _check_handle_break.break
+
+ clc
+ jmp _check_handle_break.done
+
+_check_handle_break.break:
+
+ stc
+
+_check_handle_break.done:
+
+ pop ax
+ pop bx
+ pop es
+ ret
+
;******************************************************************************
; @function _regain_control_int23
;******************************************************************************
-Subproject commit 1c5f2de0ea49b930fc16bbf187b1adb64cd01832
+Subproject commit 6d9cd8ff9e955a89b83f3e5fdd0605b6b00a1f26