Jump to content

Photo
- - - - -

[Scripting / 2.11] ZASM Tutorial


  • Please log in to reply
40 replies to this topic

#31 Revfan9

Revfan9

    Hero of Time

  • Banned
  • Real Name:Dr. Pajamas
  • Location:In front of a screen

Posted 26 April 2007 - 02:27 PM

QUOTE(Brandon1 @ Apr 26 2007, 08:43 AM) View Post

Oh, man, I hate Assembly, couldn't it be C++ or Delphi, but Assembly, man I still remember the headaches I got when I messed with z80.
I think I am doomed to not learn any CPU level language.

Oh and what is Zscript? Another CPU Level language or what?

Edit: I read the other thread, and I must say, ZScript sounds lots of times easier. (It looks very similar to PHP, which I am good at). I will be coding in ZScript once Zelda Classic 2.5 arrives. icon_biggrin.gif



Yeah. This topic was for people who prefer to use assembly languages. Sadly, I am the only person in existance who thinks this way. Even sadder, the high-level equivalent of Zasm (and the more popular), Zscript, currently has no tutorials in existance. And the saddest of all is that I am the only one who has the time to write one, and I don't understand high-level languages at all.

#32 Brandon1

Brandon1

    Experienced Forumer

  • Members
  • Real Name:Brandon
  • Location:Somewhere in Latin America

Posted 26 April 2007 - 04:19 PM

QUOTE(Revfan9 @ Apr 26 2007, 02:27 PM) View Post

Yeah. This topic was for people who prefer to use assembly languages. Sadly, I am the only person in existance who thinks this way. Even sadder, the high-level equivalent of Zasm (and the more popular), Zscript, currently has no tutorials in existance. And the saddest of all is that I am the only one who has the time to write one, and I don't understand high-level languages at all.


But that's completely weird, high level programming languages are often much more simpler than Assembly. icon_razz.gif

I will be making mods and stuff in ZScript for ZeldaClassic 2.5 once it's released. 3-6 months is more than enough for me to finish my website and forum script.

Edited by Brandon1, 26 April 2007 - 04:19 PM.


#33 Darkhogg

Darkhogg

    Initiate

  • Members
  • Location:Madrid

Posted 25 August 2007 - 05:38 AM

hey, i think the ANDR, ANDV, ORR, ORV, XORR and XORV corresponds to the logical functions and (&) or (|) and Xor (^, not the exponent)

the three functions takes the number to binary form, and operate with both. let's use the numbers 1001101 and 1011011
with and, returns 1 when both values are 1, and 0 in other case:
CODE
1001101 <- first value
1011011 <- second value
-------
1001001 <- result


with or, returns 1 if one of the values are 1, and 0 if both are 0
CODE
1001101 <- first value
1011011 <- second value
-------
1011111 <- result


and with Xor (exclusive or), returns 1 only if the values are 1 and 0, or 0 and 1, and not if both are 1 or 0:
CODE
1001101 <- first value
1011011 <- second value
-------
0010110 <- result


the xor have a special property (is correct? property?? i don't know, sorry xDD icon_redface.gif ), weel, when you make:
A ^ B you obtain C. ok. and when you do, with the same A B and C, A ^ C you obtain B. this is good for simple encrypting.


i expect that i've helped someone =D

PD: i haven't read the rest of the posts, and if someone have already said that, sorry for the redundance icon_razz.gif

#34 MadGonzo

MadGonzo

    Recipient of Ways

  • Members
  • Location:Neverland Ranch

Posted 09 February 2008 - 10:39 PM

revfan...
you wrote "ANDR" not sure
those 3 are bitwise operations
AND:
1 and 1 is true, 1 and 0 is false (A or B is not true) etc.
OR:
1 or 0 is true, 0 or 0 is false (A or B must be true for this operation to return true)
XOR:
returns true if A or B are different from each other
1 XOR 0 returns true, whereas 0 XOR 0 returns false

read this
http://www.vipan.com...itwisehelp.html
gah! redundancy post! sorry darkhogg icon_razz.gif
and you're right, but there arent that many people that uses bitwise operations like that, but its a quick way to do a modulo operation

Edited by MadGonzo, 09 February 2008 - 10:45 PM.


#35 KDillon

KDillon

    Senior

  • Members
  • Real Name:Keith
  • Location:TX

Posted 09 February 2008 - 11:08 PM

hmm
i think this is gravedigging im not sure
and revfan was banned as it says so i dont think he will be writing something here anytime soon...

#36 sonlen

sonlen

    Junior

  • Members
  • Real Name:Chris

Posted 01 May 2008 - 08:11 PM

When i try the code you had in the tutorial thing that moves the ffc when you push the arrow keys, it says

unable to parse 1 from script Zasm.txt
the error was: invalid instruction.
the command was (waitframe) (,)

What does that mean????
also the version is v.2.11 beta build 18


Edited by sonlen, 01 May 2008 - 09:08 PM.


#37 Old Inactive Member

Old Inactive Member

    I'm back sorta.

  • Members

Posted 12 May 2008 - 04:11 PM

QUOTE(sonlen @ May 2 2008, 02:11 AM) View Post
When i try the code you had in the tutorial thing that moves the ffc when you push the arrow keys, it says

unable to parse 1 from script Zasm.txt
the error was: invalid instruction.
the command was (waitframe) (,)

What does that mean????
also the version is v.2.11 beta build 18

When I was trying to learn Zasm I fixed that script so look below

CODE

WAIT WAITFRAME
  COMPAREV INPUTUP,1
  GOTOTRUE UP
  COMPAREV INPUTDOWN,1
  GOTOTRUE DOWN
  COMPAREV INPUTLEFT,1
  GOTOTRUE LEFT
  COMPAREV INPUTRIGHT,1
  GOTOTRUE RIGHT
  GOTO WAITFRAME
UP SETV y,-1
  GOTO WAIT
DOWN SETV y,1
  GOTO WAIT
LEFT SETV x,-1
  GOTO WAIT
RIGHT SETV x,1
  GOTO WAIT

Should work Pm me if it dosen't

Also I made a sligly drifent version that might be of some use to Newbie scripters

CODE

WAIT WAITFRAME
COMPAREV INPUTUP,1
GOTOTRUE UP
COMPAREV INPUTDOWN,1
GOTOTRUE DOWN
COMPAREV INPUTLEFT,1
GOTOTRUE LEFT
COMPAREV INPUTRIGHT,1
GOTOTRUE RIGHT
GOTO WAITFRAME
UP ADDR y,-1
GOTO WAIT
DOWN ADDR y,1
GOTO WAIT
LEFT ADDR x,-1
GOTO WAIT
RIGHT ADDR x,1
GOTO WAIT


That will make the combo move 1 pixle in that direction instead of the frist one where it would go to that Location
Try and figger out how to make the last one compile if you need more help with that Pm me
(ps I'm not a scripter i just learned the very basics mainly this thread)

Hopes this helps

BBcode is relly anoying me

Edited by billy ronald, 12 May 2008 - 04:15 PM.


#38 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 20 November 2008 - 04:17 AM

Revfan come back we need you. This tutorial was really useful to me and will try to learn zasm scripting. Can someone revive this tutorial? As far as i read , zasm can do pretty cool impressive things than zscript. Revfan come back.

#39 Joe123

Joe123

    Retired

  • Members

Posted 20 November 2008 - 05:05 AM

icon_eyebrow.gif
What can ZASM do that ZScript cant?

Nobody codes in ZASM round here; you'd be much better off learning ZScript.

And Revfan really isn't going to come back =P

#40 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 20 November 2008 - 01:23 PM

Of what i read its easier to write? Maybe because it all looks to simple . And you dont have to write it like zscript format for it to compile. People should at least give zasm scripts a go too icon_shrug.gif but thats just me.

#41 Joe123

Joe123

    Retired

  • Members

Posted 20 November 2008 - 01:54 PM

ZScript's much easier to write because it's so much better-structured.


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users