ok guys i have 2 problems

1st - i am using textpad and i'm having problems with the compiler.. As advised i have dowloaded a86, i added it to textpad through the configure tab on the menu and choosing prefernces, tools, add and clicking on the a86 program icon.. i then added the required class files.. it should work but when i try to compile i dont get compile in the in the tools menu (what i get when using pc,s at uni) i just get a86 and when i click on it nothing seems to happen and i cant run the program

as u will already have guessed this prevents me from testing the code to see whats happening

2nd - the program... as you can see its just a coin flip program, it chooses heads or tails according to odd or even time from the system clock..
i want to compare the generated values with the value inputted from the user, how do i do this? is my code even in the right order i.e is it doing what its supposed to do?

the idea is to print either 'you win' or 'you lose' depending on wether the values are the same or different

JMP START								;skip over the message


;The DATA AREA

cmsg: DB 'The coin comes up $'
hmsg: DB 'Heads$'
tmsg: DB 'Tails$'
wmsg: DB 'You Win!$'
lmsg: DB 'You Lose!$'
chmsg:DB 'Heads or Tails? Enter "0" for Heads "1" for tails$'


START:
;OUTPUT FIRST MESSAGE
	LEA DX,chmsg
	MOV AH,9
	INT 21H
;GET INPUT VALUE
	MOV AH,6      <------- do i need to change where this is going?
	INT 21H
;READ SYSTEM CLOCK
	MOV AH,2cH
	INT 21H
;TEST FOR EVEN SECOND COUNT
	test DL,1
	JNZ heads	;SECONDS ARE EVEN
;MUST BE TAILS
	LEA DX,tmsg
	JMP next	;SECONDS ARE ODD
heads:	LEA DX,hmsg
next:	MOV AH,9
	INT 21H
;COMPARE VALUES
	CMP      <------- is this where it goes?
	MOV AH,4Ch	;MS-DOS FUNCTION-NUMBER FOR SUCCESSFUL EXIT
	INT 21H		;GO BACK TO THE OPERATING SYSTEM

thanks for takng time to read, i know i'm stupid lol :eek:

>> CMP <------- is this where it goes?

you need to specify what is being compared, two registers ? example:

cmp ax,bx
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.