Guest User

Untitled

a guest
Aug 27th, 2014
8
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.76 KB | None | 0 0
  1. Working:
  2.     while (text[i] != 0) {
  3.         if ((text[i] == 13) | (currentColumn >= 80)) {
  4.             currentLine++;
  5.             currentColumn = 0;
  6.             gpu_clearline(currentLine);
  7.             writeIO(gpuSlot, GPUDRV_IOADR_LINESEL, currentLine);
  8.         }
  9.        
  10.         if (text[i] != 13) {
  11.             writeIO(gpuSlot, GPUDRV_IOADR_DATA + currentColumn, text[i]);
  12.             currentColumn++;
  13.         }
  14.        
  15.         i++;
  16.     }
  17.  
  18.  
  19. Not working:
  20.     while (cont) {
  21.         if ((text[i] == 13) | (currentColumn >= 80)) {
  22.             currentLine++;
  23.             currentColumn = 0;
  24.             gpu_clearline(currentLine);
  25.             writeIO(gpuSlot, GPUDRV_IOADR_LINESEL, currentLine);
  26.         }
  27.        
  28.         if ((text[i] != 0) & (text[i] != 13)) {
  29.             writeIO(gpuSlot, GPUDRV_IOADR_DATA + currentColumn, text[i]);
  30.             currentColumn++;
  31.         }
  32.        
  33.         if (text[i] == 0) {
  34.             cont = 0;
  35.         }
  36.        
  37.         i++;
  38.     }
Advertisement
Add Comment
Please, Sign In to add comment