I tried alot to print this arrow with random generated values which are 0101 , every time it should be differnt,

please help me out thanks :)

Untitled1.png

That's a poor explanation of what may be someone's homework. One could fulfill this by printing the arrow then the random value.

Besides that, where's your code and where are you stuck?

I rarely see anyone write your code for you. Maybe some psuedocode but no more unless it's to fix a stubborn line that just eludes us.

PS. I see your topic title mentions "assembly" but for which CPU? I think I've written assembly code for over 20 processors over the years. Not that it will help here but there are now virtual assembler systems as well as real ones. CALL OUT WHICH SYSTEM YOU ARE TARGETING. Some use serial ports for text i/o or on x86 make BIOS calls and then for the really adventurous there's assembly on an Android platform.

Its 8086 Processor 16 bit
I use DOSbox console for this Assembly language Code .
I need to use video memory to print out this with 01’s

  1. You called out the target. Good.
  2. Where's your code so far?
  3. I need to use video memory to print out this with 01’s

I have to write "No you won't be doing that."

Why? Because of the amount of work to find out the video card in this 808x machine such as Hercules, VGA, etcs and where the video memory is and what bytes to change there to get text on screen. It's far too much to assign in a classrooom so my bet is you should use the old BIOS calls from 1983 or there abouts. Such is documented on the web so here's our good source Rosettacode.org with an 8086 HELLO WORLD which outputs text using a BIOS call.

https://rosettacode.org/wiki/Hello_world/Text#8086_Assembly

this is the basic code actually which prints 0 and 1s random , but I want to print with an arrow, which require video memory location from x and y axis's .............

   [org 0x100]

;BEFORE EXECUTION OF .COM FILE REDUCE SPEED OF CYCLES TO 1 TO OBSERVE RANDOM SEQUENCE

mov ax,0xb800
mov es,ax

mov cx,500

for_loop:

push cx ;to maintan the value of counter
mov ax,00h
 int 1Ah     ;CHECK DX for random I am using dl
pop cx

shr dl,1
jc printOne
jnc printZero

printOne:
mov ah,0x1A
mov al,'1'
mov [es:di],ax

jmp next

printZero:
mov ah,0x1A
mov al,'0'
mov [es:di],ax

next:
add di,2

loop for_loop

mov ax,0x4c00       
int 21h

which require video memory location from x and y axis's

Again I disagree. If you wanted to do that you would have months to figure out how to accomplish this with the four major cards back then such as Hercules, VGA, eVGA and IBM's Monochrome adapter.

My bet is you just print out your characters line by line.

I see you do have loops so that's good to see but you may not have grown up around computers of that era so in short forget the idea of X and Y and just think of how a printer used to work.
You could send a CR (carriage return) and LF (line feed) then you knew you were at the beginning of the line.

Now you can emit characters as you need for line 1, then 2 etc. Keep going till it's done.

A low level computing construct is a low-level programming language intended for a particular kind of processor. ... Gathering code can be changed over to machine code utilizing a constructing agent. Since most compilers convert source code straightforwardly to machine code, programming designers frequently make programs without utilizing low level computing construct.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.