Talk:83Plus:BCALLs:50B3: Difference between revisions

From WikiTI
Jump to navigationJump to search
Saibot84 (talk | contribs)
request
 
No edit summary
Line 1: Line 1:
==Working Code==
==Working Code==
I know this is probably trivial, but I was wondering if someone could please post a simple working example of what this BCALL does (meaning, not exactly a disassembly of the original TIOS code, but an example nonetheless) for those of us who feel BCALLing TIOS routine should be avoided whenever possible. ;^) [[User:Saibot84|Saibot84]] 09:38, 6 November 2006 (PST)
I know this is probably trivial, but I was wondering if someone could please post a simple working example of what this BCALL does (meaning, not exactly a disassembly of the original TIOS code, but an example nonetheless) for those of us who feel BCALLing TIOS routine should be avoided whenever possible. ;^) [[User:Saibot84|Saibot84]] 09:38, 6 November 2006 (PST)
:Something like this:
  ''(on some versions, monkey with port [[83Plus:Ports:3A|3A]])''
  ''(monkey with port [[83Plus:Ports:04|4]])''
  ''(delay a bit)''
  in a,(2)
  and 1
  jr nz,BatteryGood
  res 5,([[83Plus:Flags:18|iy+$18]])
  jr Done
BatteryGood:
  set 5,(iy+$18)
Done:
  ''(restore port 4 and/or 3A)''
  bit 5,(iy+$18)
  ret
:The different versions do different things to port 4; I have no idea what this means.
:On another note: I think these routines should be split up into separate pages.  As it is it's not clear that 50B3 is the one that's documented (and has the official name Chk_Batt_Low) and is thus presumably the one TI recommends programmers use.  It also needs to be pointed out that the boot code versions are only available on HW version 2 and above!
:[[User:FloppusMaximus|FloppusMaximus]] 14:40, 6 November 2006 (PST)

Revision as of 22:40, 6 November 2006

Working Code

I know this is probably trivial, but I was wondering if someone could please post a simple working example of what this BCALL does (meaning, not exactly a disassembly of the original TIOS code, but an example nonetheless) for those of us who feel BCALLing TIOS routine should be avoided whenever possible. ;^) Saibot84 09:38, 6 November 2006 (PST)

Something like this:
  (on some versions, monkey with port 3A)
  (monkey with port 4)
  (delay a bit)
  in a,(2)
  and 1
  jr nz,BatteryGood
  res 5,(iy+$18)
  jr Done
BatteryGood:
  set 5,(iy+$18)
Done:
  (restore port 4 and/or 3A)
  bit 5,(iy+$18)
  ret
The different versions do different things to port 4; I have no idea what this means.
On another note: I think these routines should be split up into separate pages. As it is it's not clear that 50B3 is the one that's documented (and has the official name Chk_Batt_Low) and is thus presumably the one TI recommends programmers use. It also needs to be pointed out that the boot code versions are only available on HW version 2 and above!
FloppusMaximus 14:40, 6 November 2006 (PST)