Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


help on basic programming

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
jam84
Advanced Cheater
Reputation: 0

Joined: 29 Oct 2005
Posts: 78
Location: Malaysia

PostPosted: Wed Sep 05, 2007 10:58 pm    Post subject: help on basic programming Reply with quote

base on this assembler script...



[code] ORG 0000H

MOV A,#11111110B ; SET ACC TO CONTAIN 11111110B

START: MOV P1,A ;SEND TO PORT 1 TO ON 1 LED

MOV R2,#3 ;DELAY FOR 0.3 SEC

CALL DEALY ;ON FOR

RL A ;ROTATE THE CONTENT OF 1 BIT TO LEFT

JMP START ;REPEAT

DELAY: MOV R0,#00 ;LOAD R0 WITH 0

MOV R1,#200 ;LOAD R1 WITH 200

LOOP: DJNZ R0,LOOP ;LOOP ITSELF FOR 256

TIME=256x2US=512US

DJNZ R1,LOOP ;x 200=0.1024SEC

DJNZ R2,DELAY ;X 3=0.3 SEC

RET ;RETURN TO MAIN ROUTINE

END[/code]

now the question

how do i rotate the bits by 2 bits to the right?

what changes must be done?

pls help

_________________
Long Live Cheat Engine!!!
Think My Avatar Is Cool?
Give Me A Thumb If U Think So!!!
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25821
Location: The netherlands

PostPosted: Fri Sep 07, 2007 6:15 pm    Post subject: Reply with quote

got homework for a programmable interface card eh ?

80515 or something similar ?

Anyhow, it's been a while and not sure, but try replacing the RL A with 2 times the line RR A (not sure, look up the instruction for rotate right)

Or if there is no rotate right (for some messed up reason) and A is a 9 bit register then add 5 more RL A lines (so a total of 6) to have the equivalent of 2 rotate rights

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
jam84
Advanced Cheater
Reputation: 0

Joined: 29 Oct 2005
Posts: 78
Location: Malaysia

PostPosted: Sat Sep 08, 2007 6:35 am    Post subject: Reply with quote

yes its an assignment more then a homework
oh... its 89S51 by Atmel

so i juz need to chnage the RL A
to RR Ax2?
so it should be;
RR A
RR A
???

_________________
Long Live Cheat Engine!!!
Think My Avatar Is Cool?
Give Me A Thumb If U Think So!!!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites