M302de: BC: borlandify two functions of seg029
fix
M302de: BC: change signature
M302de: BC: borlandifcation of seg040 funcs
M302de: BC: remove cruft, sort local variables