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 


Desperately need help with assembly language

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
MaximuS
I post too much
Reputation: 3

Joined: 05 Apr 2007
Posts: 3212
Location: ......

PostPosted: Thu Oct 15, 2015 2:46 pm    Post subject: Desperately need help with assembly language Reply with quote

I have this assignment due in about 7 hours.
I desperately need help, if anybody can help please do so.
This involves OpenGL
Assignment Source file .asm: https://www.dropbox.com/s/vkh29z69ue6rag3/ast10.asm?dl=0

Assignment PDF:https://www.dropbox.com/s/q0v0jkrxc8c3o4k/asst10.pdf?dl=0

Compile/Assemble/Link Script + Test script:https://www.dropbox.com/s/yivata3eq12xu4n/asm10.rar?dl=0

OpenGL test:
https://www.dropbox.com/s/9glt46xknpcttg3/a10openGLtest.zip?dl=0
I need this two functions finished


Code:
; ******************************************************************
;  Function getParams()
;   Get, check, convert, verify range, and return the
;   A value, B value, draw color, and draw speed.

;  Example HLL call:
;   stat = getParams(argc, argv, &aValue, &bValue,
;            &drawSpeed, &drawColor)

;  This routine performs all error checking, conversion of ASCII/Vegismal
;  to integer, verifies legal range of each value.
;  For errors, applicable message is displayed and FALSE is returned.
;  For good data, all values are returned via addresses with TRUE returned.

;  Command line format (fixed order):
;   -a <vegismalNumber> -b <vegismalNumber> -ds <vegismalNumber>
;            dc <vegismalNumber>

; -----
;  Arguments:
;   1) ARGC, value
;   2) ARGV, address
;   3) a value (dowrd), address
;   4) b value (dword), address
;   5) draw color (dword), address
;   6) draw speed (dword), address
;WRITE CODE HERE
;getParams
;*checkrgc
;   if(argc == 1)
;      display use msg
;      return no success
;   if(argc != 9)
;      display err msg, return  NOSUCCESS
;      .
;      .
;      .
   cmp rdi, 1
   jne NxtChr
   mov rdi, useMsg
   call printString
   jmp exitFail
exitFail:
   mov rax, NOSUCCESS
;   .
;   .
;   .
;*check argv[1]
   if (argv[1] != 'a' NULL)
      error, return NOSUCCESS
   mov rbx, qword[rsi+8]
   cmp byte[rbx], '-'
   jne errOnA
   cmp byte[rbx], 'a'
   jne errOnA
   cmp byte [rbx+2], NULL
   jne errOnA
;*check argv[2]
mov r12, rsi
mov rdi, qword[r12+12]
mov rsi, tmpNum
call vegismal2int
cmp rax, TRUE
jne errOnAvalue
   pops
   ret


; ******************************************************************


and this plot function

Code:
; ******************************************************************
;  Plot Function.
;  Note, function is called by openGL

;  Compute and plot the points.
;   x = cos (((2.0 * Pi) / (a+speed)) * t)
;   y = sin (((2.0 * Pi) / b) * t)

; -----
;  Gloabal variables accessed.
;  Globals are set via provided main.

common   aValue      1:4         ; A value
common   bValue      1:4         ; B value
common   drawColor   1:4         ; draw color
common   drawSpeed   1:4         ; draw speed
common   stop      1:1

global   plotLissajou
plotLissajou:
;   save preserved registers



; -----
; Prepare for drawing
;   glClear(GL_COLOR_BUFFER_BIT);

   mov   rdi, GL_COLOR_BUFFER_BIT
   call   glClear

; -----
;  set draw color(r,g,b)

   ; glColor3ub(r,g,b)
   ; glBegin(GL_POINTS);


; -----
;  Set speed based on user entered drawSpeed
;   speed = drawSpeed / scale



; -----
;  Get and convert aValue and bValue from int to float.



; -----
;  Set lpMax based on largest of a or b.

   movsd      xmm0, qword [a]
   movsd      xmm1, qword [b]
   ucomisd      xmm0, xmm1
   jb      useB
   movsd      qword [lpMax], xmm0
   jmp      setMdone
useB:   movsd      qword [lpMax], xmm1
setMdone:

; -----
;  Adjust a based on calculated speed value.


; -----
;  Check for animation stop.


; -----
;  Main plot loop.

mainPlotLoop:

;  iterate:
;   x = cos (((2.0 * Pi) / (a+speed)) * t)
;   y = sin (((2.0 * Pi) / b) * t)
;   plot (x,y)
;   t = t + step



; -----
;  plotting done, show image

   call   glEnd
   call   glFlush

   call   glutPostRedisplay

; -----
;  if t > circle degrees
;   resset t to 0.0

   movsd   xmm0, qword [t]
   movsd   xmm1, qword [myPi]
   mulsd   xmm1, qword [circleDegrees]
   ucomisd   xmm0, xmm1
   jb   plotDone
   movsd   xmm0, qword [fZero]
   movsd   qword [t], xmm0

; -----
;  done

plotDone:
   pop   r12
   pop   r15
   pop   rbp
   ret

; ******************************************************************
Back to top
View user's profile Send private message MSN Messenger
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sat Oct 17, 2015 7:41 pm    Post subject: Reply with quote

Asking for help with something is fine, but asking for people to literally just do your homework.. no.

Locked.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    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