2 ; Ullrich von Bassewitz, 31.05.2002
4 ; const char* __fastcall__ tgi_map_mode (unsigned char mode);
5 ; /* Map tgi mode codes to driver names */
9 .import _tgi_mode_table
13 ;----------------------------------------------------------------------------
14 ; BEWARE: The current implementation of tgi_map_mode does not work with tables
15 ; larger that 255 bytes!
24 @L0: lda _tgi_mode_table,y
25 beq NotFound ; Branch if mode code zero
33 bne @L1 ; Loop until end marker found
35 bne @L0 ; Branch always
46 sec ; Account for the mode byte
47 adc #<_tgi_mode_table ; Return pointer to file name