I'm studying the Hsoft part of the driver. It is odd, very odd. But brilliant....
Here we have the original EXOS rst 30 call:
002B 00 NOP
002C 00 NOP
002D 00 NOP
002E 00 NOP
002F 00 NOP
0030 F3 DI
0031 32 5A 00 LD (005Ah), A
0034 B7 OR A
0035 E3 EX (SP), HL
0036 18 07 JR 003Fh
0038 F5 PUSH AF
0039 37 SCF
003A 18 09 JR 0045h
003C C3 FF 00 JP 00FFh
003F 7E LD A, (HL)
0040 23 INC HL
0041 E3 EX (SP), HL
0042 32 59 00 LD (0059h), A
0045 DB B3 IN A,(B3)
0047 32 55 00 LD (0055h), A
004A 3E 00 LD A, 00
004C D3 B3 OUT (B3), A
004E C3 10 C4 JP C410h
Then in the driver they hook a different memory segment and address(where the driver is):
in a, (0B3h)
ld (4Bh), a
ld hl, INT ; This is the subroutine where the read of the serial port is made in the driver
ld (4Fh), hl
ld hl, 0B3D3h
ld (2Bh), hl ; Puts "OUT (B3),A" at 2Bh
Later, in the INT subroutine, this is the way it returns to C410:
INT800:
pop af
pop de
jr nc, INT900 ; EXOS call
in a, (0B4h)
and 10101010b
scf
jr nz, INT900 ; Interrupt
ld hl, 0FBF1h
ld (2Dh), hl
ld a, 0C9h ; 'É'
ld (2Fh), a
pop hl
ld a, (55h)
jp 2Bh ; OUT (B3),A;POP AF;EI;RET
; ---------------------------------------------------------------------------
INT900:
ld hl, 10C3h
ld (2Dh), hl
ld a, 0C4h ; 'Ä'
ld (2Fh), a
pop hl
ld a, 0
jp 2Bh ;OUT (B3),A;JP C410
It creates for two options two different little codes on that unused bytes from 2Bh to 2Fh..!
On another part the code even auto-modifies itself!
Is for that "details" I doubt the serial mouse can be ported to SimbOS.....