view lib/kreiderclib/gets.as @ 3083:f631d26d4913

level1: Rename "coco1" DriveWire modules to "38400" Better reflects the fact that only the baud rate is different in these modules.
author Tormod Volden <debian.tormod@gmail.com>
date Sun, 26 Jul 2015 10:38:59 +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