CSEG segment
assume cs:CSEG, ds:CSEG, es:CSEG, ss:CSEG
org 100h
;начало
Begin: mov ax,3D00h
mov dx,offset File_name
int 21h
jc Error_file
mov Handle,ax
mov bx,ax
mov ah,3Fh
mov cx,0FF00h
mov dx,offset Buffer
int 21h
mov ah,3Eh
mov bx,Handle
int 21h
mov dx,offset Mess_ok
Out_prog:
mov ah,9
int 21h
int 20h
Error_file:
mov dx,offset Mess_error
jmp Out_prog
;конец
Handle dw 0
Mess_ok db 'Файл загружен в память! Смотрите в отладчике!$'
Mess_error db 'Не удалось открыть (найти) файл '
File_name db 'd:\doc.txt',0,'!$'
Buffer equ $
CSEG ends
end Begin
Experience faster, easier, and safer browsing today
Download the latest version of Windows Internet Explorer 8 today
Download free trials today
Explore and evaluate great Microsoft products for your company
Windows Live Photo Gallery
Manage and edit your photos,then publish them online to share or print
Get free online chat support
Sign up for Small Business+ and receive free online support on Microsoft products
Experience Zune 3.0: Download a free Zune Pass trial and find musical connections, latest releases, and personalized recommendations
Microsoft .NET Framework 3.5 SP1: Get more controls, improved start-up performance, AJAX support, and more
mov ah,3Fh
mov cx,0F800h ;вообще говоря, 0ff00h - много
mov dx,offset Buffer
int 21h ;читаем файл
mov cx,ax ; длина файла
mov ah,3Eh
mov bx,Handle
int 21h ;закрываем
mov ah,40h
lea dx,Buffer ;буфер, в cx - длина буфера
mov bx,1 ;стандартное выходное устройство - экран
int 21h ;выводим на экран
mov dx,offset Mess_ok
Если Вы уже зарегистрированы на Портале - войдите в систему, если Вы еще не регистрировались - пройдите простую процедуру регистрации.