Aller au contenu
View in the app

A better way to browse. Learn more.

Next

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[ass]lire un fichier et ecrire dans un autre?

Featured Replies

Posté(e)

:keskidit::francais::D:mdr::D bonjour à tous, j'ai besoin de votre aide!!!!!,

j'ai un petit exercice a faire et voila: je dois aller lire un fichier txt et ecrire dans un autre txt. Lire j'y arrive mais j'arrive pas à ecrire dans l'autre fichier...

moi je procede comme suit:

je lit un caractere , je l'ecrit dans l'autre fichier je lis un caractere, je l'ecrit et ainsi de suite... jusqu'a la fin du texte...

;--------------------------------------------------------
; *******     |
;*******|
;       |
;       |
;--------------------------------------------------------
TITLE EXE5.ASM          ;|
       .MODEL small          ;|
       .STACK 256                ;|
       .386          ;|
;-------------------------------------------------------





;*********************************************************************

       	.DATA



handle dw ?
handle2 dw ?
adr db "source.txt",0
adr2 db "source2.txt",0
nbByte db ?
mode db ?
var db 32
buf db ?
buf2 db ?
temp db ?
temp2 dw ?

;*********************************************************************



;*************
;macro
;*************

;******
;affiche
;******


AffEcran	macro str
 mov dx,offset str
 mov ah,09h
 int 21h

endm

open_file	macro   ad
 mov ah, 3dh
 mov al, 00h; read only
 mov dx,offset ad; adresse
 int 21h
endm

read_file	macro handle,buff
 mov ah,3fh
 mov bx,handle
 mov cx,01h
 mov dx,offset buff
 
 int 21h
endm



write_file	macro handle,buff
 mov ah, 40h
 mov bx,offset handle
 mov cx,0h
 mov dx,offset buff
 int 21h
endm



create_file	macro f
 
 mov dx, offset f
 mov ah,3ch
 mov cx,00h
 
 int 21h
endm
 



close_file  macro	handle
 mov ah,3eh
 mov bx,offset handle
 int 21h
endm

 
;***********************end Macro*************************************



 .CODE

  
MAIN    proc far
mov ax,@data
       mov ds,ax



open_file adr2
mov handle2,ax

open_file adr
mov handle,ax



readwrite:
 
push ax
read_file handle,buf//lit un caractere
mov ax,handle

;mov buf,ah
pop ax
;mov buf2,ah

write_file handle2,buf//ecrit un caractere
jmp readwrite




;create_file adr2	


mov ah,4Ch; RETOUR AU DOS

     	int 21h

endp MAIN 




 END   MAIN

please help me!!!!

Modifié par googie

Archivé

Ce sujet est désormais archivé et ne peut plus recevoir de nouvelles réponses.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.