git-svn-id: branches/i8086@23753 -
@@ -3,25 +3,19 @@
cpu 8086
segment text use16
-
+
extern PASCALMAIN
..start:
mov ax, dgroup
mov ss, ax
mov sp, stacktop
mov ds, ax
mov es, ax
jmp PASCALMAIN
- segment data use16
segment stack stack
- resb 1024
+ resb 4096
stacktop:
- segment bss
- group dgroup data bss stack
+ group dgroup stack
@@ -7,6 +7,9 @@ interface
type
HRESULT = LongInt;
+procedure DebugWrite(const S: string);
+procedure DebugWriteLn(const S: string);
implementation
procedure fpc_Initialize_Units;[public,alias:'FPC_INITIALIZEUNITS']; compilerproc;
@@ -21,4 +24,26 @@ begin
end;
+begin
+ asm
+ mov si, S
+ lodsb
+ mov cl, al
+ xor ch, ch
+ mov ah, 2
+@@1:
+ mov dl, al
+ int 21h
+ loop @@1
+ end;
+end;
+ DebugWrite(S);
+ DebugWrite(#13#10);
end.