LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-01-2016, 04:17 PM   #1
Rinndalir
Member
 
Registered: Sep 2015
Posts: 733

Rep: Reputation: Disabled
Some C translated from assembly and some high level understanding


Here at line 233 I am trying to understand what is happening:

https://github.com/NagyD/SDLPoP/blob.../seqtbl.c#L233


I am only looking for the simplest terms but provide what ever response you want. (Of course this goes without saying but I say it because of my novice C skills, I don't need much right now.)

There are:

LABEL(abc) abc_thing1, abc_thing2
LABEL(def) def_thing1, def_thing2, def_thing3

As far as I can LABEL(abc) doesn't do anything.

What is seqtbl? I guess it's an array but it's not clear to me.

The byte declaration is confusing too, could that not also have been char?
 
Old 08-01-2016, 04:38 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
LABEL(abc) and jmp(abc) go together. It's the assembly version of goto/label:
https://en.wikipedia.org/wiki/Goto
 
Old 08-03-2016, 01:10 AM   #3
Rinndalir
Member
 
Registered: Sep 2015
Posts: 733

Original Poster
Rep: Reputation: Disabled
The compiler is doing something with those LABEL and jmp commands? There's also a macro called LABEL. I'm a little closer toward understanding this but not by much.
 
  


Reply

Tags
assembly, c programming, code, port



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
High level ping user efuenteso General 1 08-12-2011 12:19 PM
Could use some help understanding assembly WilliamR Programming 6 12-17-2009 12:58 PM
Practical Assembly: Help Understanding gcc -S for simple.c? jhwilliams Programming 2 11-30-2009 05:30 PM
Very high system level processing kenneho Linux - Server 10 01-12-2009 05:20 AM
understanding DOS vs Linux assembly language shortname Programming 10 03-07-2007 10:04 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration