view lib/kreiderclib/gets.as @ 3285:345ff5806dd7

Correct coco.d filename in shipped Defsfile files It seems that 8 years ago in commit 2624:b8c7b7fbf3c9 the coco defs were put into a new "coco.d" (from "systype"), and the various level*/<port>/defsfile were updated. However, the level*/<port>/defs/Defsfile (that are copied to the disk images under DEFS) were apparently wrongly updated.
author hpmachining <aur@hpminc.com>
date Thu, 18 Jun 2020 20:29:32 +0200
parents 1647f1874cdf
children
line wrap: on
line source

* Disassembly by Os9disasm of gets.r

 section code

gets: pshs  u 
 ldu   4,s 
 bra   L0008 
L0006 stb   ,u+ 
L0008 leax  _iob,y 
 pshs  x 
 lbsr  getc 
 leas  2,s 
 cmpb  #$0d 
 beq   L0021 
 cmpd  #-1 
 bne   L0006 
 clra   
 clrb   
 bra   L0025 
L0021 clr   ,u 
 ldd   4,s 
L0025 puls  u,pc 
fgets: pshs  u 
 ldx   4,s 
 clr   ,x 
 ldu   6,s 
 beq   L0060 
 pshs  x 
 bra   L003f 
L0035 ldx   ,s 
 stb   ,x+ 
 stx   ,s 
 cmpb  #$0d 
 beq   L0054 
L003f leau  -1,u 
 stu   -2,s 
 beq   L0054 
 ldd   10,s 
 pshs  d 
 lbsr  getc 
 leas  2,s 
 cmpd  #-1 
 bne   L0035 
L0054 clr   [,s] 
 cmpd  #-1 
 bne   L0060 
 clra   
 clrb   
 bra   L0062 
L0060 ldd   6,s 
L0062 leas  2,s 
 puls  u,pc 

 endsect