At least your SDL_Loop looks perfectly correct to me (except for the "<>" thingy).
However your screenbuffer-stuff looks unfamiliar ... maybe try a simpler method (writeln).