You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			44 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			C++
		
	
			
		
		
	
	
			44 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			C++
		
	
| // vim: set noet ts=4 sw=4:
 | |
| 
 | |
| #include "appl.h"
 | |
| #include "../../device/ps2controller.h"
 | |
| #include "../../object/outputstream.h"
 | |
| #include "../../device/textstream.h"
 | |
| 
 | |
| char text[] = "Ich mag\n\
 | |
| Saftige Pflaumen voller Aroma\n\
 | |
| Ich ficke jede Oma ins Koma\n\
 | |
| Ich bin Großmutterficker, Großmutterficker\n\
 | |
| Ich bin Großmutterficker, ich bin Großmutterficker\n\
 | |
| \n\
 | |
| Saftige Pflaumen voller Aroma\n\
 | |
| Ich ficke jede Oma ins Koma\n\
 | |
| Ich bin Großmutterficker, Großmutterficker\n\
 | |
| Ich bin Großmutterficker\n\
 | |
| Und wacht sie aus'm Koma auf, kriegt sie von mir 'n Sticker\n\
 | |
| \n";
 | |
| 
 | |
| extern TextStream kout;
 | |
| 
 | |
| void activeWaitDelay(uint64_t cycles) {
 | |
|     uint64_t counter = 0; // Use volatile to prevent optimization
 | |
|     for (uint64_t i = 0; i < cycles; ++i) {
 | |
|         counter++; // Simple operation to consume cycles
 | |
| 		asm("nop");
 | |
|     }
 | |
| }
 | |
| 
 | |
| void Application::action() {  // NOLINT
 | |
| 	uint16_t cnt = 0;
 | |
| 	while (1) {
 | |
| 		while(text[cnt++] != '\n'){
 | |
| 			kout << text[cnt-1];
 | |
| 		}
 | |
| 		kout << endl << flush;
 | |
| 
 | |
| 		activeWaitDelay(1000000000);
 | |
| 		if(cnt >= sizeof(text)-1)
 | |
| 			cnt=0;
 | |
| 	}
 | |
| }
 |