Phoenix
Well-Known Member
- Messages
- 6,814
- Reaction score
- 1,419
So I was looking at some older Fortran code today of the old game "SkiFree" (Ex-Fortran coder here lol ) and this made me laugh:
c Calcualate terminal speed
subroutine speed(na)
parameter
1 io$_sensemode = '27'x,
1 tt$c_baud_2400 = '0B'x,
1 tt$c_baud_4800 = '0D'x,
1 tt$c_baud_9600 = '0F'x
character*(*) na
logical*1 stats(8),modes(8)
common /logterm/ ltt
call sys$qiow(,%val(ltt),%val(io$_sensemode),stats,,,modes,%val(8),,,,)
i=stats(3)
if (i .gt. tt$c_baud_9600) then
na='very fast'
else if (i .gt. tt$c_baud_4800) then
na='fast'
else if (i .gt. tt$c_baud_2400) then
na='4800 baud'
else
na='slow'
end if
return
end
c Another name for SLOW
subroutine fred
call slow
return
end

c Calcualate terminal speed
subroutine speed(na)
parameter
1 io$_sensemode = '27'x,
1 tt$c_baud_2400 = '0B'x,
1 tt$c_baud_4800 = '0D'x,
1 tt$c_baud_9600 = '0F'x
character*(*) na
logical*1 stats(8),modes(8)
common /logterm/ ltt
call sys$qiow(,%val(ltt),%val(io$_sensemode),stats,,,modes,%val(8),,,,)
i=stats(3)
if (i .gt. tt$c_baud_9600) then
na='very fast'
else if (i .gt. tt$c_baud_4800) then
na='fast'
else if (i .gt. tt$c_baud_2400) then
na='4800 baud'
else
na='slow'
end if
return
end
c Another name for SLOW
subroutine fred
call slow
return
end