Browse Source

* bugfix with parameter line, removed enter key when found in it

carl 27 years ago
parent
commit
8b4ffa26ba
1 changed files with 10 additions and 0 deletions
  1. 10 0
      rtl/amiga/prt0.as

+ 10 - 0
rtl/amiga/prt0.as

@@ -18,7 +18,17 @@ start:
     movel	a0,__ARGS
     beq    .Ldont_nullit
 
+
+| Remove $0a character from end of string
+    movew  d0,d1
+    subqw  #1,d1
+    cmpb   #0x0a,a0@(0,d1:w)
+    bne    .Lcontt
+| Decrement count by one to remove the $0a character
+    movew  d1,d0
+ .Lcontt:
 	 moveb  #0,a0@(0,d0:w)	   | null terminate it
+    movew  d0,__ARGC
  .Ldont_nullit:
 
     jsr PASCALMAIN