Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1545 connectés 

  FORUM HardWare.fr
  Programmation
  ASM

  [ASM] Question tres tres simple

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[ASM] Question tres tres simple

n°141121
Professeur​Thibault
Apprenti Dessinateur.
Posté le 19-05-2002 à 22:40:39  profilanswer
 

Comment on fait un CLS, clear screen ?
paske comme je lance mon prog a partir de dos, il reste tjs des traces des lignes de la console.
En fait je gere pas trop les affichages.
en cours on ns a montré :
MsgBateau  DB 0Dh,0Ah,'dsfjgpfsdjfk $'
ms je sais pas trop a koi correspondent les 0Dh et 0Ah


---------------
Book, works, et news : http://www.reuno.net
mood
Publicité
Posté le 19-05-2002 à 22:40:39  profilanswer
 

n°141126
Harkonnen
Modérateur
Un modo pour les bannir tous
Posté le 19-05-2002 à 23:35:33  profilanswer
 

0Dh et 0Ah sont les codes hexa des caracteres Line Feed et Carriage Return. Ils te permettent d'aller à la ligne.
 
Un exemple de CLS :
 

Code :
  1. ; This program clears the screen from DOS. To clear the screen,
  2. ; it defines a window the size of the whole screen and then
  3. ; scrolls that window to clear its contents.
  4. ; After linking, use EXE2BIN CLEAR.EXE CLEAR.COM
  5. ; to convert it to a .COM file.
  6. clear segment
  7. assume cs:clear
  8. mov ah,15  ; get current video state data
  9. int 10h
  10. mov bl,bh  ; save video page
  11. xor cx,cx  ; set upper-left-corner
  12. mov dl,ah  ; set lower-left-corner
  13. dec dl   ; (adjust)
  14. mov dh,24
  15. mov bh,7  ; normal attr
  16. cmp al,4  ; graphics screen?
  17. jb c1   ; no
  18. cmp al,7
  19. je c1   ; no
  20. mov bh,cl  ; yes-use attr 0
  21. c1: mov al,cl  ; scroll length 0-clear window
  22. mov ah,6  ; scroll page to clear the screen
  23. int 10h
  24. mov ah,2  ; reposition cursor
  25.         mov bh,bl  ; (restore video page)
  26. mov dx,cx  ; upper-left-corner (CX=0 from scroll)
  27. int 10h
  28. int 20h   ; return to DOS
  29. clear ends
  30. end


---------------
J'ai un string dans l'array (Paris Hilton)

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  ASM

  [ASM] Question tres tres simple

 

Sujets relatifs
ptite question en delphi [facile][html] Question de nOOb
[JAVA/JINI]Comment ca marche ? (desoler question vague ....)[directDraw | DD pour delphi] affichage simple dans une surface....
[RCH] Pong tout simple en visual basiceuh question bete html...
[VB / VB.NET] Juste une toute petite question toute bête[PHP] question débutant
[PHP] newbie questionjava : question sur "synchronized"
Plus de sujets relatifs à : [ASM] Question tres tres simple


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR