Category : Pascal Source Code
Archive   : TPTC17SC.ZIP
Filename : STOUPPER.INC

 
Output of file : STOUPPER.INC contained in archive : TPTC17SC.ZIP

(*--------------------------------------------------------
* map string to upper case (tpas 4.0)
*)

{$F+} procedure stoupper(var st: string); {$F-}
begin

Inline(
$C4/$7E/$06/ { les di,[bp]6 ;es:di -> st[0]}
$26/ { es:}
$8A/$0D/ { mov cl,[di] ;cl = length}
$FE/$C1/ { inc cl}

{next:}
$47/ { inc di}
$FE/$C9/ { dec cl}
$74/$12/ { jz ends}

$26/ { es:}
$8A/$05/ { mov al,[di]}
$3C/$61/ { cmp al,'a'}
$72/$F4/ { jb next}
$3C/$7A/ { cmp al,'z'}
$77/$F0/ { ja next}

$2C/$20/ { sub al,' '}
$26/ { es:}
$88/$05/ { mov [di],al}
$EB/$E9); { jmp next}

{ends:}
end;



  3 Responses to “Category : Pascal Source Code
Archive   : TPTC17SC.ZIP
Filename : STOUPPER.INC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/