Author Topic: Famas + am learning asm to code rapid fire  (Read 3068 times)

Offline Famas

  • Granny Spanker
  • *
  • Posts: 403
  • Post quality +1/-8
  • Acidmods User
Famas + am learning asm to code rapid fire
« on: January 16, 2011, 02:24:00 PM »
hello acidmods Famas here trying to learn asm i dont no about any of you but the words just dont make sense to me ive ben browsing threw this and im wondering if someone can tell me how if i was coding myself witch bit needs to stay and witch bit id need to edit to add modes etc my main objective is to go through hazers code 1 line at a time and anything and everything im going to ask about so expericened coders please assist me as i would like to learn how to code to help everyone out heres the learning curve

http://forums.xbox-scene.com/index.php?showtopic=679378

Post Merge: January 16, 2011, 02:49:34 PM
ok im just reading now and i get this needs to be there

 list      p=12F683       ; list directive to define processor
    #include <p12F683.inc>   ; processor specific variable definitions

but what is the error for here

    errorlevel  -302         ; suppress message 302 from list file

is this if the include isnt there ?


and could you explain what all this are 1 off or on for and when you would need them off or on ?

 __CONFIG   _FCMEN_OFF & _IESO_OFF & _CP_OFF & _CPD_OFF
& _BOD_OFF & _MCLRE_OFF & _WDT_OFF & _PWRTE_ON
& _INTOSCIO

« Last Edit: January 16, 2011, 02:49:34 PM by Famas »

Offline hyper999

  • Acidmods Alumni
  • Millennium Poster
  • *
  • Posts: 1158
  • Post quality +544/-3
  • Research and Development
Re: Famas + am learning asm to code rapid fire
« Reply #1 on: January 16, 2011, 03:02:08 PM »
Code: [Select]
    errorlevel  -302         ; suppress message 302 from list file
i cant remember exactly what error this is but it is just telling the compiler to ignore it and you can ignore it too.

Code: [Select]
__CONFIG   _FCMEN_OFF & _IESO_OFF & _CP_OFF & _CPD_OFF
& _BOD_OFF & _MCLRE_OFF & _WDT_OFF & _PWRTE_ON
& _INTOSCIO

these are the configuration bits of the pic, they are explained in the tuts, and in the datasheet, but you can probably ignore them for now

now work through the tuts trying to do the same as they are but try and avoid looking at the code they have written and just copying it
« Last Edit: January 16, 2011, 03:03:21 PM by hyper999 »

Offline Famas

  • Granny Spanker
  • *
  • Posts: 403
  • Post quality +1/-8
  • Acidmods User
Re: Famas + am learning asm to code rapid fire
« Reply #2 on: January 16, 2011, 03:04:13 PM »
im not looking at the tuts im looking at the link provided :(

Offline EasyE

  • Motor Mouth
  • *
  • Posts: 83
  • Post quality +2/-1
  • Gender: Male
  • Acidmods User
Re: Famas + am learning asm to code rapid fire
« Reply #3 on: January 17, 2011, 02:54:18 AM »
Gooligum is awsome i have not learned to make a whole new code but i have learned how to modify the codes i have got from am to my playing style. I give it the thumbs up

Offline hyper999

  • Acidmods Alumni
  • Millennium Poster
  • *
  • Posts: 1158
  • Post quality +544/-3
  • Research and Development
Re: Famas + am learning asm to code rapid fire
« Reply #4 on: January 17, 2011, 08:07:20 AM »
^ see famas ;)

Offline Hazer

  • x4675636B4E7574
  • Acidmods Alumni
  • Acid Modder
  • *
  • Posts: 583
  • Post quality +59/-0
Re: Famas + am learning asm to code rapid fire
« Reply #5 on: January 17, 2011, 05:17:06 PM »
Code: [Select]
list      p=12F683       ; list directive to define processor
    #include <p12F683.inc>   ; processor specific variable definitions

That there defines all of the labels for the 12F683 chip. In otherwords, when the code calls to put something in OSCCON register, the address for that register is different for different types of PICs. So the include file is a definition file of all of the standard register names for the specific PIC you are working with. That way, you can move your code between different PIC chips without rewriting the register addresses.

Code: [Select]
   errorlevel  -302         ; suppress message 302 from list file

PICs use a banking scheme for the register memory map. Any time you address a register, the compiler will issue a warning to make sure you have selected the correct memory bank. This creates a ton of warnings when you compile the hex file. This line suppresses those warnings so that only the errors that count will be shown at compile time.

Code: [Select]
__CONFIG   _FCMEN_OFF & _IESO_OFF & _CP_OFF & _CPD_OFF
& _BOD_OFF & _MCLRE_OFF & _WDT_OFF & _PWRTE_ON
& _INTOSCIO

These are the config bits. Look at Chapter 12 of teh 12F683 datasheet to see what these mean. Its great practice and understanding. The CP bits controll code protection. BOD is the Brownout Detection feature. The WDT is the hardware WatchDog Timer. PWRTE is the Power Timer Enable that basically forces the PIC to remain idle on power-on for so many useconds so the clock can stablize before it executes instructions. INTOSCIO is the Internal Oscillator with the option to use the clock pins as General IO. All of these options are burned in with the firmware since they are not either not directly controlled with code or need to be set as a defualt until the code has a chance to execute before reconfiguring them.
[Quote from Gamermodz via Viking forums]
Don't be jealous your not half as smart. I hate ****tards like you. An ignorant redneck. Your nothing but a posing ******. Get the **** out of here, really, your claim to fame is an open source rapid fire code? You make me laugh. You think you have control over the modding market?  You couldn't create what I can and do. You are too ignorant with your outrageous assumptions and accusations. [/Quote]

Offline Famas

  • Granny Spanker
  • *
  • Posts: 403
  • Post quality +1/-8
  • Acidmods User
Re: Famas + am learning asm to code rapid fire
« Reply #6 on: January 17, 2011, 05:21:33 PM »
yea ive been doing alot of reading and at the top of your code burn me up do you cahnge the frequenzy to what the factory set is the the zeros at just before main

 

SMF spam blocked by CleanTalk
SimplePortal 2.3.5 © 2008-2012, SimplePortal