Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Assembly program question

Status
Not open for further replies.

sagar474

Full Member level 5
Joined
Oct 18, 2009
Messages
286
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,318
Location
India,kakinada
Activity points
3,122
Code:
BITS 16

	mov ax, 07C0h		; Set data segment to where we're loaded
	mov ds, ax;
	mov ax,9999
	mov ss,ax
	mov sp,0000h;


test_string db 'Test' ; it prints a if these two lines are erased 
mov si,test_string


;----------------------to print 'A' --------------------------------------------
	mov al,41h
	mov ah,0eh;	
	int 10h;
;-------------------------------------------------------------------------------------		
	
	jmp $; jump hear ie., infinite loop


	
times 510-($-$$) db 0	; Pad remainder of boot sector with 0s
	dw 0xAA55		; The standard PC boot signature
this program should print A bit it prints dose nothing

help
please
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
48,178
Helped
14,199
Reputation
28,657
Reaction score
12,888
Trophy points
1,393
Location
Bochum, Germany
Activity points
279,134
You have placed the string inside your code, so the processor will try to execute the data as instruction. It should be place somewhere else, e.g. after jmp $..
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top