Category : Files from Magazines
Archive   : FEB91.ZIP
Filename : 2N02035A
COMMENT @
fibonacci table:
demonstrates using REPT block to initialize data
unfortunately Masm 5.0 constants are limited to 16 bits
so the table is shorter than I'd like
C Program considers table an unsigned int array
extern unsigned fib_table[24]
Version 1.0 Small Memory Model
To assemble with Masm V. 5.0 -- masm /b60 /Ml fibtable;
June 26, 1990
Michael Kelly -- Author
May be used freely if authorship is acknowledged
@
_DATA SEGMENT WORD PUBLIC 'DATA'
PUBLIC _fib_table ;make accessible to C program
prev_fib = 0
this_fib = 1
fib = 1
_fib_table LABEL WORD
REPT 24
DW fib
fib = this_fib + prev_fib ;calc fib to 16 bit limit
prev_fib = this_fib
this_fib = fib
ENDM
_DATA ENDS
END
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
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/