寻找某种方法将数组保存在文件中 - 就像数字一样(现在程序像文本一样保存)

Looking for some way to save array in file - like a numbers (now program saves all like a text)

xor    ax, ax
mov    tab[100], '$'
mov    ah, 3ch
mov    cx, 00000000b
lea    dx, filename1
int    21h
jc     openerr
mov    handle, ax
mov    ah, 40h
mov    bx, handle
mov    cx, 100
lea    dx, tab
int    21h
jc     openerr
mov    ah, 3eh
mov    bx, handle
int    21h

这是您需要做的事情的概述:

  • 从数组中读取一个值,编号65
  • 将此值转换为其文本表示形式,字符串“65”
  • 添加一个space字符,字符串“65”
  • 将结果写入文件,使用CX=3
  • 对数组中的所有值重复前面的操作,重复100次

转换是困难的部分,但是您可以在任何地方找到很多好的例子,包括在这个论坛上。