Unknown B_CALLs and their OS 2.41/BOOT 1.02 locations: (289 to go): Page 02h: 25 Page 03h: 23 Page 04h: 10 Page 05h: 26 Page 06h: 9 Page 07h: 4 Page 74h: 14 Page 75h: 16 Page 77h: 25 Page 78h: 14 Page 79h: 12 Page 7Bh: 94 Page 7Ch: 3 Page 7Dh: 1 Page 7Fh: 7 Page 6Fh: 6 51B2h: 02:4801h 51AFh: 02:4805h 518Bh: 02:4A45h 507Ah: 02:50A5h 5077h: 02:5A6Ch 4FFCh: 02:6AD3h 4FFFh: 02:6AE3h 4E85h: 02:6B52h 4E88h: 02:6B55h 4E8Bh: 02:6B64h 4E8Eh: 02:6B67h 4E91h: 02:6BA0h 4E94h: 02:6BADh 4E97h: 02:6C01h 4E9Dh: 02:6C3Eh 4EA0h: 02:6C84h 4EA3h: 02:6CA1h 4EA6h: 02:6CC2h 4EA9h: 02:6CD7h 4EACh: 02:6CF5h 4EAFh: 02:6D02h ;this is a weird one, first instruction screws up stack 4EB2h: 02:6D16h 50FEh: 02:6EC8h 5101h: 02:7016h 5137h: 02:78F1h 5212h: 03:4296h 4756h: 03:42BAh 520Fh: 03:4622h ;res 1,(iy+0Eh) \ ret 4FBDh: 03:46E0h 4FC0h: 03:4743h 5209h: 03:47AEh 5206h: 03:48DEh 5194h: 03:4A04h 4FC3h: 03:5365h ;sets up Window Settings context 503Eh: 03:569Fh 52BAh: 03:6240h 5230h: 03:62DDh 5296h: 03:62EFh 52B7h: 03:6451h 522Ah: 03:646Fh 52AEh: 03:6552h 52D2h: 03:6621h 52CFh: 03:6632h 523Fh: 03:66ABh 51A3h: 03:6DA0h 52C6h: 03:6DF1h 512Bh: 03:7247h 51D0h: 03:7C4Ah 4D92h: 04:40ADh 5038h: 04:4165h 50A4h: 04:44E0h 5305h: 04:5D77h 5110h: 04:5E5Ah 52C9h: 04:62CEh 510Dh: 04:688Bh 52D8h: 04:7734h 52D5h: 04:7799h 518Eh: 04:7F1Dh 51EBh: 05:42DDh 51E5h: 05:4652h 4FA5h: 05:46C1h 51D3h: 05:48D2h 51BBh: 05:493Ah 51BEh: 05:4943h 51E8h: 05:5182h 51E2h: 05:51F2h 5239h: 05:54C0h 51DFh: 05:54F7h 522Dh: 05:5520h 511Fh: 05:5606h ;_wputsEOL wrapper, investigate 511Ch: 05:5690h 523Ch: 05:56E0h 52C3h: 05:5A8Ch 5245h: 05:5AADh 51DCh: 05:5AEEh 517Ch: 05:5BD8h 52B4h: 05:64D4h 51EEh: 05:656Ah 51B5h: 05:6CB5h 5224h: 05:75F7h 5299h: 05:75F7h 52CCh: 05:75FCh 5227h: 05:763Fh 52C0h: 05:7644h 5116h: 06:4516h ;crazy parsing stuff 4CD8h: 06:4676h 5119h: 06:496Eh 50ADh: 06:56DFh 4D3Bh: 06:5EDCh 4FD5h: 06:6BE7h 51D9h: 06:6D70h 524Bh: 06:6E1Bh 520Ch: 06:6E21h 51ACh: 07:59DCh 50C2h: 07:5B4Eh 5080h: 07:79CEh ;might be existing var overwrite/skip/exit/rename/etc. menu 507Dh: 07:7A08h 50F2h: 74:4DD3h ;send USB data as either host or peripheral to supported device, DE bytes from HL (RAM pages 3/2 swapped in) 5308h: 74:5A41h ;send USB data as peripheral, sends 8 bytes from tempSwapArea? 530Bh: 74:5B84h ;screws with bits 0 and 3 of (9C75h) 530Eh: 74:5B92h ;bit 4,(81h) 5311h: 74:5B9Bh ;outputs eight bytes from 9C29h, returns vendor/product IDs and release number in HL/DE/BC 52E1h: 74:5B9Fh ;bit 4,(9C75h) 526Ch: 74:5CC8h ;checks 0,(9C0Ch), seems to get set regardless, and returns B=70h 526Fh: 74:5CDEh ;returns carry if B is not 70h, so probably directly related to 526Ch 5272h: 74:5CE8h ;C is input, returns carry if B is not 70h, so probably directly related to 526Ch/526Fh, does no USB port inputs/outputs 5275h: 74:5D2Dh ;same as 5272h minus a check from (9C0Ch) 527Bh: 74:5D34h ;pretty much just calls 5272h then makes a (9C0Ch) check 527Eh: 74:5DA6h ;returns carry if B is not 70h, then a (9C0Ch) check 5281h: 74:5DB7h ;returns carry if B is not 70h, resets 2,(9C0Ch) 5278h: 74:5DD2h ;returns carry if B is not 70h, outputs zeroes to ports 30h/31h, resets 1,(9C0Ch) 51FDh: 75:40DCh ;involves displaying cursor on large font option, stat plot stuff 4FA2h: 75:41E1h ;short and simple, no clue what it means 5203h: 75:4216h ;checks whether current context is...something, probably stat plot related 524Eh: 75:434Bh 4F9Fh: 75:4449h 51F4h: 75:4596h ;displays STAT PLOTS info 51F7h: 75:496Dh 5104h: 75:4994h 5107h: 75:49F7h 5251h: 75:4A6Ch 529Fh: 75:4D52h 52A2h: 75:4DCCh 52A5h: 75:55F3h 52A8h: 75:5672h 52ABh: 75:56E4h 52DBh: 75:5873h 5323h: 77:46BCh ;some sort of soft reset, deletes non-prog variables, recreates L1-L6, makes newly-written apps show up. 531Dh: 77:4774h ;displays app/program description intro settings screen thingy 5320h: 77:4B67h ;displays "RESET COMPLETE" and stuff like that 51A6h: 77:4EB1h ;ld hl,003Fh \ ld (ioPrompt),hl \ ret 51A9h: 77:4EB8h ;some parsing thing... 5113h: 77:4EFDh ;deletes equation 03h,2Dh,00h,00h... 4E5Eh: 77:4F05h ;might be some sort of string/number input 4E61h: 77:4F0Bh ;same as above, only set 1,(iy+9) instead of reset 5188h: 77:4F73h 4E64h: 77:4FA9h ;displays a number and waits for enter, I think 516Ah: 77:50CAh ;more math stuff than I care about 5170h: 77:518Ch ;too much crazy math 5143h: 77:5272h ;math stuff 5146h: 77:53B8h ;res 6,(iy+3Fh) \ ret 5149h: 77:53BDh ;set 6,(iy+3Fh) \ ret 5158h: 77:53C2h ;creates a temporary string and returns it in OP1, filled with math stuff 5152h: 77:53E9h ;subroutine of above 5164h: 77:5498h ;like 5158h 515Eh: 77:54C2h ;math stuff... 5179h: 77:550Ah 514Ch: 77:5542h ;math... 51D6h: 77:5CE0h ;I don't know, but might be mode screen related, cursor hook 5200h: 77:5E3Fh ;NZ if not a certain context, don't know what it is 51FAh: 77:605Ah ;definitely related to time setting context, funky 51C4h: 77:60EEh ;the actual cxMain routine to something 4A89h: 78:42E9h ;makes sure FPS1 and FPS2 are REAL, otherwise ErrDataType? 4B01h: 78:5A30h 4B04h: 78:5A33h ;same as 4B01h minus some flag changes 4B07h: 78:5A3Fh 521Eh: 78:5CE3h 4AF8h: 78:5E1Bh ;parsing stuff 4AFEh: 78:5F56h 4B0Ah: 78:6768h ;ERR:DATA TYPE if A is not one of a couple of values 5218h: 78:695Eh 521Bh: 78:6A07h 5215h: 78:6FBCh 50D7h: 78:700Ah ;uses parser hook with A=2, you pass the token to execute in A and either 1, 2, or 3 in C, which makes it look in different tables, sort of 5125h: 78:7D2Ah ;funky way of setting up homescreen context 51C1h: 78:7D70h 52DEh: 79:4217h ;subroutine of the "soft reset", does NOT make newly-written apps show up 5062h: 79:5144h ;might set up window context or something 505Fh: 79:5157h 45E2h: 79:5793h ;potentially calls menu hook with A=3 45E8h: 79:5B4Bh ;backs up some flags 5068h: 79:5B96h ;probably something to do with the table 5053h: 79:5C8Fh 5134h: 79:6D89h ;sets up new program/new group context, selectable somehow, probably leaves memory open 50C8h: 79:7270h ;may be group related, deselects all vars 50C5h: 79:729Eh ;creates group in OP1, you select the vars you want with VAT type byte (sometimes throws ERR:ARGUMENT, work on it) 5140h: 79:733Ch ;who knowws, but jumps to certain code based on A, 20h to 2Dh, ErrArgument otherwise 513Dh: 79:7348h ;same as above but skips a couple checks (which do scary math) 4C1Eh: 7B:55D5h 4C21h: 7B:55DBh 4C03h: 7B:55E0h 4D3Eh: 7B:55E1h 4C1Bh: 7B:568Eh 4C06h: 7B:58A1h ;inits a context and installs rawkey hook 4C2Ah: 7B:58BEh ;res 6,(iy+2Dh) 4FE1h: 7B:58C3h ;rawkey hook used by OS for above context 4C15h: 7B:58DAh 4C18h: 7B:58E5h 4C24h: 7B:58EAh 4C27h: 7B:58F6h 4C09h: 7B:5906h 4C0Ch: 7B:5914h 4C0Fh: 7B:5929h 4C2Dh: 7B:5934h 4C12h: 7B:593Dh 4C5Dh: 7B:598Dh 4CABh: 7B:5B17h 4CC3h: 7B:5C78h 4CE7h: 7B:5C78h 4CC0h: 7B:5C94h 4CE4h: 7B:5C94h 4CC6h: 7B:5CCCh 4CBAh: 7B:5CD9h 4CDEh: 7B:5CD9h 4CF0h: 7B:5D13h 4CD2h: 7B:5D31h 4CCFh: 7B:5DA3h 4CF3h: 7B:5E27h 4CB7h: 7B:5EA0h 4CCCh: 7B:5EA9h 4CC9h: 7B:5F44h 4CF6h: 7B:5F45h 4CF9h: 7B:6034h 4CD5h: 7B:603Ah 4CFCh: 7B:6119h 4CFFh: 7B:6165h 4D02h: 7B:61A6h 4D05h: 7B:6216h 4D08h: 7B:6255h 4D0Bh: 7B:625Ch 4D0Eh: 7B:6298h 4D11h: 7B:62B7h 4D14h: 7B:62F1h 4D17h: 7B:6339h 4D1Ah: 7B:635Dh 4D1Dh: 7B:6394h 4D20h: 7B:6461h 4D23h: 7B:6497h 4CEAh: 7B:6623h 4E2Eh: 7B:6643h 4D2Ch: 7B:6656h 4D59h: 7B:667Eh 4E1Ch: 7B:6B63h 4E22h: 7B:6B96h 4E19h: 7B:6BB6h 4E31h: 7B:6BE4h 4DDDh: 7B:6C0Ah 4E49h: 7B:6C0Dh 4DE6h: 7B:6C2Dh ;installs a cursor hook 4E25h: 7B:6C58h ;disables the cursor hook and does other crap 4E37h: 7B:6E24h 4E34h: 7B:6E45h 4DECh: 7B:6E84h 4D74h: 7B:6E8Ah 4DA1h: 7B:6E8Bh 4DEFh: 7B:6F96h 4E40h: 7B:722Fh 4E46h: 7B:7240h 4C57h: 7B:7357h 4C5Ah: 7B:735Bh 4D56h: 7B:7525h 4DA7h: 7B:753Dh 4DAAh: 7B:7549h 4DADh: 7B:7586h 4DB0h: 7B:75BAh 4DB3h: 7B:75CFh 4DB6h: 7B:75D3h 4DBCh: 7B:75F2h 4DB9h: 7B:75F5h 4DBFh: 7B:7620h 4D68h: 7B:7632h 4DA4h: 7B:7696h 4DCEh: 7B:7699h 4D50h: 7B:774Eh 4DC2h: 7B:7756h 4DC5h: 7B:7791h 4E58h: 7B:782Ch 4E5Bh: 7B:785Bh 4D4Ah: 7B:7871h 4D4Dh: 7B:7874h 4E55h: 7B:7888h 4D8Fh: 7B:79D5h 4F1Eh: 7C:619Ah ;simple enough, but no clue what the purpose is 4F27h: 7C:61B6h ;simple enough, but no clue what the purpose is 4F2Dh: 7C:6421h ;reads from certificate and sends/receives I/O data...Flash must be unlocked first 50CBh: 7D:6E14h ;does lots of things, including _DelVarSym and a funky crashing method of installing a new application 804Eh: 7F:4924h 8066h: 7F:4F82h 8069h: 7F:4EF0h 8081h: 7F:5D6Dh 8096h: 7F:4B1Ah 80AEh: 7F:53B3h 80B4h: 7F:4E52h 80E4h: 6F:4145h 8102h: 7F:4B4Dh 8105h: 6F:592Ah ;disables USB interrupts, lots of port outputs 8108h: 6F:5276h 810Bh: 6F:6297h ;set 1,(81h) and wait 810Eh: 6F:5933h ;like 8105h