Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,496,166
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-28-24 11:27 AM
Guest: Register | Login

0 users currently in General Chat | 1 guest | 1 bot

Main - General Chat - Ever gotten a exam stuck in the head? New thread | New reply


Ailure
Posted on 10-12-07 04:57 PM Link | Quote | ID: 67557

Hats
Steam Board2 group
Level: 121

Posts: 1637/3965
EXP: 19782300
Next: 274396

Since: 02-19-07
From: Sweden, Skåne

Last post: 3303 days
Last view: 2054 days
/***************************************
*
* Project : ex2d
* Description : Sending a string
* History : 9/9-07 Emil Larsson
*
***************************************/
#include <lpc2xxx.h>
#include <general.h>
/*****************************************************************************
*
* Description:
* Initializes the UART channel #0 (38.4 kbps, 8N1)
*
****************************************************************************/
void
initUart0(void)
{
//enable uart #0 pins (P0.0 = TxD0, P0.1 = RxD0)
PINSEL0 = 0x05;
//initialize bitrate (by first enable DL registers, DLAB-bit = 1)
U0LCR = 0x80;
//Note to self, below gives a bitrate of 39062,5... slightly higher than 38.4 kbps.
//Needs some tuning!
U0DLL = 0x61; //least significant part of divisor
U0DLM = 0x00; //most significant part of divisor 6
U0LCR = 0x00;
//initialize LCR: 8N1
U0LCR = 0x03;
//disable FIFO
U0FCR = 0x00;
//clear interrupt bits, just in case (not used)
U0IER = 0x00;
}
/*****************************************************************************
*
* Description:
* Blocking output routine, i.e., the routine waits until the uart
* buffer is free and then sends the character.
*
* Params:
* [in] charToSend - The character to send/print
*
****************************************************************************/
void
sendChar(tU8 charToSend)
{
//Wait until THR register is empty
while( U0LSR != 0x20);
//output character value to THR
U0THR = charToSend;
}
/***************************************************************
*
* Description: Blocking function that sends string (null-
* terminated) to UART channel #0.
*
* Parameters: pString – pointer to null-terminated string*
*
***************************************************************/
void
sendString(tU8 *pString){
while(*pString != '\0'){
sendChar(*pString);
pString++;
}
}

int main(){
initUart0();
sendString("It's annoying as hell, I can't stop thinking in C code. x_X");
sendString("And I hate the stupid lpc2146 quirks... it's a ARM-based microcontroller.");
sendString("It's like when you played tetris for hours, and see blocks everywhere... or a simulation game and see tiles everywhere.");
sendString("I hate writing programming code for hand adsfdsf... especially when it's hard to go back and correct.");
return 0;
}


____________________
AIM: gamefreak1337, MSN: Emil_sim@spray.se, XMPP: ailure@xmpp.kafuka.org


NightKev
Posted on 10-13-07 01:27 AM Link | Quote | ID: 67573


Cape Luigi
Level: 131

Posts: 1945/4792
EXP: 26234272
Next: 190348

Since: 03-15-07

Last post: 3736 days
Last view: 3648 days
Thread title =
English much?
---
So wait, you have to write out the C code? Wtf?

____________________

GreyMaria
Posted on 10-13-07 03:09 AM Link | Quote | ID: 67579

>implying even the Japanese understand the Japanese
Level: 105

Posts: 604/2851
EXP: 11922775
Next: 339485

Since: 07-13-07

Last post: 4499 days
Last view: 4469 days
Posted by NightKev
Thread title =
English much?
---
So wait, you have to write out the C code? Wtf?


Do remember, Ailure are Swedish.

And why the fucking complications? xD

____________________
we're currently experiencing some technical difficulties

NightKev
Posted on 10-13-07 06:07 AM Link | Quote | ID: 67598


Cape Luigi
Level: 131

Posts: 1949/4792
EXP: 26234272
Next: 190348

Since: 03-15-07

Last post: 3736 days
Last view: 3648 days
Posted by Grey Mario
Posted by NightKev
Thread title =
English much?
---
So wait, you have to write out the C code? Wtf?


Do remember, Ailure are Swedish.

And why the fucking complications? xD
I know he is, but so far I've seen him use pretty good english on the board and stuff. Maybe he was just or something when he wrote the thread title?

____________________

Ailure
Posted on 10-13-07 08:49 PM Link | Quote | ID: 67620

Hats
Steam Board2 group
Level: 121

Posts: 1639/3965
EXP: 19782300
Next: 274396

Since: 02-19-07
From: Sweden, Skåne

Last post: 3303 days
Last view: 2054 days
My head was dizzy when I made the thread title. XD Hell, I went to sleep and slept for 13 hours or so afterwards. I was quite exhausted.

____________________
AIM: gamefreak1337, MSN: Emil_sim@spray.se, XMPP: ailure@xmpp.kafuka.org


Jin Dogan
Posted on 10-14-07 08:58 PM Link | Quote | ID: 67690


Snifit
Level: 38

Posts: 208/277
EXP: 364600
Next: 5847

Since: 03-14-07

Last post: 5797 days
Last view: 4333 days
Yea, one time I studied so hard for my European History Exam I kept going through the lineage of English kings in my sleep and didn't have too many dreams.

Main - General Chat - Ever gotten a exam stuck in the head? New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.021 seconds. (323KB of memory used)
MySQL - queries: 47, rows: 62/62, time: 0.015 seconds.