• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Moving Text Program in Assembly Language

 
yousaf khan
Ranch Hand
Posts: 32
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to make a program in assembly language using 8086 emulator in which i want to display a text on the screen that moves on the screen like a screensaver. I have tried making it but the text moves only on X-axis. I want it to move on both x-axis and y-axis at the same time, that is, it should move forward as well as downward direction. I have started studying assembly language recently so don't know much about it. Any help would be appreciated.
Here's what i have tried so far but it isn't working as i want it to.
 
yousaf khan
Ranch Hand
Posts: 32
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have figured out the solution. Any admin can delete this post if they want to.
 
Jeanne Boyarsky
author & internet detective
Posts: 42006
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

yousaf khan wrote:i have figured out the solution. Any admin can delete this post if they want to.


Or you could share the solution so if someone else has the same problem, he/she can learn....
 
yousaf khan
Ranch Hand
Posts: 32
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So here's the complete code of what i wanted to do. The problem was that i was comparing the value of 'DH' register to jump to next loop but 'DH' register's value was getting lost during screen clearance. Feel free to ask any questions related to this program.
 
limsa sengah
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
good day, can I ask for an idea, I'm struggling with my project, the instruction is that the Fisrtname is running a "W" form, when the end that is on the right side at the top of the W form is reached , the Lastname will appear, thank you very much  

.model small
.stack 100h

.data
 
   firstName1 db '  My NAME   ', 0Dh, 0Ah, '$'
   firstName2 db '  My LASTNAME   ', 0Dh, 0Ah, '$'
 

.code
main:
   mov ax, @data
   mov ds, ax

   ; Set the number of iterations (adjust as needed)
   mov cx, 2

   displayLoop:
       ; Hide the name
       lea dx, blank
       mov al, 13h
       mov ah, 0
       int 10h ; set graphics video mode.
       mov al, 1100b
       mov cx, 10
       mov ah, 09h
       int 21h

       ; Delay for 1 second (adjust as needed for your desired speed)
       mov cx, 10000
       delayLoop1:
           dec cx
           jnz delayLoop1

       ; Print the first name
       lea dx, space1
       mov al, 13h
       mov ah, 0
     
       int 10h ; set graphics video mode.
       mov al, 1100b
       mov cx, 10
       mov ah, 09h
       int 21h

       ; Display the first name
       lea dx, firstName1
       mov ah, 09h
       int 21h

       ; Delay for 1 second (adjust as needed for your desired speed)
       mov cx, 1000
       delayLoop:
           dec cx
           jnz delayLoop

   ; Move to the next iteration
       
   displayLoop2:
       ; Hide the name
       lea dx, blank
       mov al, 13h
       mov ah, 0
       int 10h ; set graphics video mode.
       mov al, 1100b
       mov cx, 10
       mov ah, 09h
       int 21h

       ; Delay for 1 second (adjust as needed for your desired speed)
       mov cx, 10000
   delayLoop3:
           dec cx
           jnz delayLoop3

       ; Print the first name
       lea dx, space2
       mov al, 13h
       mov ah, 0
       int 10h ; set graphics video mode.
       mov al, 1100b
       mov cx, 10
       mov ah, 09h
       int 21h

       ; Display the first name
       lea dx, firstName2
       mov ah, 09h
   
       int 21h

       ; Delay for 1 second (adjust as needed for your desired speed)
       mov cx, 10000

       ; Move to the next iteration
          loop displayLoop
   ; Exit the program
   mov ah, 4Ch
   int 21h
end main
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic