Certain retinal disorders, if not detected in time, can be serious enough to cause blindness in patients. This paper proposes a low-cost and portable smartphone-based decision support system for initial screening of diabetic retinopathy using sophisticated image analysis and machine learning techniques. It requires a smartphone to be attached to a direct hand-held ophthalmoscope. The phone is used to capture fundus images as seen through the direct ophthalmoscope. We deploy pattern recognition on the captured images to develop a classifier that distinguishes normal images from those with retinal abnormalities. The algorithm performance is characterized by testing on an existing database. We were able to diagnose conditions with an average sensitivity of 86%. Our system has been designed to be used by ophthalmologists, general practitioners, emergency room physicians, and other health care personnel alike. The emphasis of this paper is not only on devising a detection algorithm for diabetic retinopathy, but more so on the development and utility of a novel system for diagnosis. Through this mobile eye-examination system, we envision making the early screening of diabetic retinopathy accessible, especially to rural regions in developing countries, where dedicated ophthalmology centers are expensive, and to alleviate detection in early stages.