Browse Source

* PrintChar and OpenChannel converted to pure assembler functions

git-svn-id: branches/z80@45135 -
nickysn 5 years ago
parent
commit
843024f3b7
1 changed files with 16 additions and 20 deletions
  1. 16 20
      rtl/zxspectrum/system.pp

+ 16 - 20
rtl/zxspectrum/system.pp

@@ -146,28 +146,24 @@ begin
   KeyPressed:=LastKey<>#0;
 end;
 
-procedure OpenChannel(Chan: Byte);
-begin
-  asm
-    ld iy,(save_iy)
-    ld a, (Chan)
-    push ix
-    call 5633
-    pop ix
-    ld (save_iy),iy
-  end;
+procedure OpenChannel(Chan: Byte);assembler;
+asm
+  ld iy,(save_iy)
+  ld a, (Chan)
+  push ix
+  call 5633
+  pop ix
+  ld (save_iy),iy
 end;
 
-procedure PrintChar(Ch: Char);
-begin
-  asm
-    ld iy,(save_iy)
-    ld a, (Ch)
-    push ix
-    rst 16
-    pop ix
-    ld (save_iy),iy
-  end;
+procedure PrintChar(Ch: Char);assembler;
+asm
+  ld iy,(save_iy)
+  ld a, (Ch)
+  push ix
+  rst 16
+  pop ix
+  ld (save_iy),iy
 end;
 
 procedure PrintLn;