This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.List | |
import Data.String | |
import Text.Read | |
import System.Environment | |
import System.IO | |
hReadCount :: Handle -> IO(Int) | |
hReadCount input = do | |
l <- hGetLine input | |
return (read l :: Int) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mov ebx, [esp+8] ; stock l'adresse de la matrice dans ebx | |
mov ecx, [esp+12]; je sais pas où il devrait y avoir la longueur de la matrice, on le met dans ecx | |
add ecx, ebx ; on calcul l'adresse de fin de la matrice | |
loop: | |
mov dl, [ebx] ; on met les 8 bits d'un élément dans edx | |
not dl ; on inverse ces 8 bits | |
mov [ebx], dl ; on les remets dans la matrice | |
inc ebx ; on va à l'élément suivant | |
cmp ebx, ecx ; est-on à la fin de la matrice ? | |
jne loop ; si non continuer la boucle |
NewerOlder