home *** CD-ROM | disk | FTP | other *** search
/ The Equalizer BBS / equalizer-bbs-collection_2004.zip / equalizer-bbs-collection / DEMOSCENE-STUFF / M96-CODE.ZIP / MEET96.ASM < prev    next >
Assembly Source File  |  1996-04-07  |  3KB  |  134 lines

  1. ;
  2. ; Meeting'96 Faaast Coding Compo!
  3. ;
  4. ; a brainstorming experience by...
  5. ;   ...Dark Angel & RedBug / Paranoia and aCceSs/aNTaReS
  6. ;
  7. ;  get in touch with us:
  8. ;
  9. ;  Paranoia: http://www.ping.be/~ping9361/paranoia.htm
  10. ;   Antares: http://www.ping.be/~ping9361
  11. ;
  12. ; Or write us.. Email: francois.baligant@ping.be
  13. ;
  14. ; Snail Mail:  Philippe Noé (aka Dark Angel)
  15. ;              Rue Baron Lheureux, 36
  16. ;              B-7340 Colfontaine (Pâturages)
  17. ;              Belgium
  18. ;              +32-(0)65-67.69.61
  19. ;
  20. ;              Miguel Vanhove (aka RedBug)
  21. ;              Rue Sainte-Barbe, 26
  22. ;              B-7060 Soignies
  23. ;              Belgium
  24. ;              +32-(0)67-34.03.60
  25. ;
  26. ;              François Baligant (aka aCceSs)
  27. ;              Rue du millénaire,3
  28. ;              B-7080 Frameries
  29. ;              Belgium
  30. ;              +32-(0)65-66.70.40
  31. ;
  32. ;    Have fun!
  33. ;
  34.  
  35. .model tiny     ;
  36. .code           ;  ----.
  37.                 ;       :
  38. .386            ;  ____.'
  39. .STARTUP        ;
  40.  
  41.  
  42. ; au début, on a ax=bx=ch=0
  43.  
  44.       push 0a000h
  45.       pop es
  46.  
  47.       xor dx,dx
  48.       xor di,di
  49.       mov bx,320
  50.  
  51.       int 16h        ; AL = ascii code
  52.       aaa            ; SUB al,'0'
  53.       cbw            ; Ah=0 ssi (al&F0h)<>F0h
  54.  
  55.       xchg ax,cx
  56.  
  57.       mov al,200d
  58.       div cx
  59.       cbw            ; Ah=0 ssi (al&F0h)<>F0h
  60.       xchg bp,ax
  61.       xor dx,dx
  62.       mov ax,bx      ; bx=320
  63.       div cx
  64.       xchg bp,dx
  65.  
  66. ; al=valeur horizontale  cx=nombre de points   bp=0
  67.  
  68.       mov ah,0       ; pas de cbw car (al&F0h) peut valoir F0h
  69.       xchg cx,ax
  70.       mov bp,13h
  71.       xchg bp,ax
  72.  
  73. ; bp=nombre de points;  ax=13h;  cx=sa valeur horizontale  <-\
  74. ; A vous de chercher, y en a marre de ces 4 opcodes de merde |
  75. ; Correction à envoyer à un de nous trois. Thanks...
  76.  
  77.       int 10h        ; ait besoin de ax=13h
  78.       push dx
  79.  
  80. @Looprow:
  81.       pusha          ; pour garder di
  82.       rep stosb
  83.       popa           ; pour reprendre di
  84.       add di,bx      ; bx=320
  85.  
  86.       dec dx
  87.       jnz @looprow
  88.  
  89.       pop dx
  90.  
  91. ; ait dx=taille verticale et cx=taille horizontale
  92.  
  93.       xor di,di
  94.       dec cx
  95. PourColonne:
  96.       push di
  97.       mov si,bp
  98. PourGrille:
  99.       stosb
  100.       add di,cx
  101.       dec si
  102.       jnz PourGrille
  103.       pop di
  104.       add di,bx           ; bx=320
  105.       dec di              ; addition de 319 à BX ;dec
  106.       stosb               ; affiche la derniere colonne
  107.       cmp di,64000
  108.       jb PourColonne
  109.  
  110.       xor di,di
  111.       imul dx,bx          ; dx=dx*320
  112.  
  113. PourLigne:
  114.       mov cx,bx      ;bx=320
  115.       pusha
  116.       rep stosb
  117.       popa
  118.       add di,dx
  119.       dec bp
  120.       jne PourLigne
  121.  
  122.       mov di,63680
  123.       rep stosb      ; derniere ligne du tableau
  124.  
  125. ;  fin de tous les affichages
  126.       int 16h        ; Attente d'une touche (ah=0)
  127.  
  128.       cbw
  129.       mov al,3h      ; retour mode texte
  130.       int 10h
  131.  
  132.       ret            ; retourne au DOS (jmp interruption 20h <=> fichier .COM)
  133. end 
  134.