Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
MasterSlowPoke
Oct 9, 2005

Our courage will pull us through
the language is stackless python, definitions cut off for brevity
code:
/* Clear the data1 and X_k_mag2_2 buffers */
   	CNTR = N;
	do clear until ce;
	dm(I2, M1) = 0;
clear:	dm(I6, M4) = 0;
  
 
main:

/**************** Window multiplication **************************/  
	i7 = window;
	CNTR = N;
	do win until ce;
	mx0 = dm(i2, m0), my0 = pm(I7, m4);
	mr = mx0 * my0(ss);
win: dm(I2, m1) = mr1;

/********* DO DFT *******/

	M6=0;  //start at DC component
	CNTR = N;
	do DFT until CE;
/***** real portion ****/
	i7=wavetable;
	MR=0,mx0=dm(i2,m1), my0=pm(i7,m6);
			CNTR=N-1;
			do cosine until CE;
cosine:	mr=MR+mx0*my0(ss),	mx0=dm(i2,m1), my0=pm(i7,m6);
		mr=MR+mx0*my0(ss);
			sr= lshift mr1 by -8(lo);
			sr= sr or ashift mr2 by -8(hi);
			Mx1=SR0;
	
/****** Imaginary Portion *******/			
	i7=wavetable+64;
	MR=0,mx0=dm(i2,m1), my0=pm(i7,m6);		
			CNTR=N-1;
			do sine until CE;
	sine:	mr=mr+mx0*my0(ss),	mx0=dm(i2,m1), my0=pm(i7,m6);
		mr=mr+mx0*my0(ss);
	 		sr= lshift mr1 by -8(lo);
			sr= sr or ashift mr2 by -8(hi);
			
			
			mr=sr0*sr0(ss);
			mr=mr+mx1*mx1(ss);
			
		dm(i5,m4)=mr1;
		ay0=m6;
		ar=ay0 + 1;
DFT:	m6=ar;
	
		
		
	




	/*Check Loop for Synch */
check:
	ax0 = N;
	ay0 = dm(count);
	ar = ax0 - ay0;
	if NE jump check;
	jump main;

 
/*========================= INTERRUPT SERVICE ROUTINES ==================================*/

/********  receive interrupt used for loopback *********/

input_samples:
	ena sec_reg;			/* use shadow register bank */
		/* CODEC left channel Tx and Rx are NOT USED */

	/* Right input channel for mic and sig gen inputs */ 	
		
	mx0 = dm(rx_buf + 2);	/* get data from codec - Right Channel - load any dreg */
	dm(I4, M4) = mx0;
	si = dm(i6,m4);
	sr= ashift si by 4( hi);
	dm(tx_buf + 2) = sr1;	/* send data to codec - Right Channel - load from any dreg */
	
	ax0 = dm(count);
	ar = ax0 - 1;
	dm(count) = ar;
	
	if EQ jump countres;
		
	rti;

	
countres:
	mx0 = N;
	dm(count) = mx0;
	ax0 = I2;
	I2 = I4;
	I4 = ax0;

	ay1 = i5;
	i5=i6;
	i6=ay1;
	
	mx0 = 0x8000;
	dm(tx_buf + 2) = mx0;
	rti;
	
#include "tx_intrrp_2181_in_out_04.h"

start.end:		/* End of Code */

MasterSlowPoke fucked around with this message at 07:59 on Apr 15, 2008

Adbot
ADBOT LOVES YOU

MasterSlowPoke
Oct 9, 2005

Our courage will pull us through

TSDK posted:

The most important thing is: does it have the reference to the original paper in the comments?

There are no comments. That c/p is from the source code for Eve Online, and over half of it is fully undocumented.

MasterSlowPoke
Oct 9, 2005

Our courage will pull us through

deimos posted:

That usually happens when you DECOMPILE source. That's not stolen source. I wish people would stop saying this poo poo.

There was a leak. If this were merely decompiled it'd be out there for a long time now.

deimos posted:

Edit: wait a second, that's not even python.

It's apparently "stackless python", a language pretty much exclusively used by CCP for Eve. I'm unsure how it differs from Python as I've never used it.

MasterSlowPoke
Oct 9, 2005

Our courage will pull us through
I guess you could have used a switch but no code with arbitrary numbers like that is going to be nice.

MasterSlowPoke
Oct 9, 2005

Our courage will pull us through

UraniumAnchor posted:

Fixed that for you.

its undefined

MasterSlowPoke
Oct 9, 2005

Our courage will pull us through

Vanadium posted:

code:
int EntrySortFunc(const void *pEl1, const void *pEl2) {
  Entry *pEntry1 = *(Entry * const *) pEl1, *pEntry2 = *(Entry * const *) pEl2;
  [...]
// sort folders before files
  bool fS1, fS2;
  if (!(fS1=!pEntry1->GetIsFolder()) != !true != !(fS2=!pEntry2->GetIsFolder())) return fS1-fS2;
:psyduck:

maybe he doesn't know that == tests for equality?

MasterSlowPoke
Oct 9, 2005

Our courage will pull us through
Making fun of intro to programming "horrors" is kind of unsporting.

MasterSlowPoke
Oct 9, 2005

Our courage will pull us through

Markov Chain Chomp posted:

The real horror here is that none of you called this guy on his homophobic bigotry. Shame on all of you.

you're not a real computer person if you're not a horrible right wing bigot

MasterSlowPoke
Oct 9, 2005

Our courage will pull us through
Just did this right now.

code:
if (Updown.Value != Upgrade.Count)
{
   Updown.Value = Upgrade.Count;
}
This didn't work, due to an event triggered when the Value of an Updown is changed. On a larf, I changed this to:

code:
while (Updown.Value != Upgrade.Count)
{
   Updown.Value = Upgrade.Count;
}
And it works. I have no idea why calling the code multiple times results in a different answer.

MasterSlowPoke
Oct 9, 2005

Our courage will pull us through
It's short for "<? echo ".

MasterSlowPoke
Oct 9, 2005

Our courage will pull us through

Thermopyle posted:

This is probably a coding horror in and of itself, but I can't stand XML and I can't really articulate any reason that an XML-defender couldn't give an answer of some sort to.

I'm coding an app that reads data from user generated, but otherwise static, XML files like this one:

http://pastebin.com/As98K9S0

It is awfully verbose, but I don't know of anything else that would make sense to use. I don't really have an extensive coding background, though.

Adbot
ADBOT LOVES YOU

MasterSlowPoke
Oct 9, 2005

Our courage will pull us through
Reposting this because I don't know if there is a better way:

MasterSlowPoke posted:

I'm coding an app that reads data from user generated, but otherwise static, XML files like this one:

http://pastebin.com/As98K9S0

It is awfully verbose, but I don't know of anything else that would make sense to use. I don't really have an extensive coding background, though.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply