Tuesday, May 30, 2006

Home Network: Gremlins

So get this… Network issues have plagued me since moving into my new place. This has been a constant source of frustration for me. Lets look at the symptoms, from greatest nuisance to least:

-Constantly dropping connection from Xbox Live
-Choppy speech, major lag with online game play
-Inconsistent NAT readings between the Xbox, the Xbox 360, and my PC’s.
-Slow transfer times via HTTP and FTP
-FTP sessions hang in mid transit, without fail, 100 percent of the time.
-Intermittent web page hanging or incomplete web page content

Now this is the same equipment I have used in previous locations without fail. So, to test things, I plugged my PC and my 360 directly to the cable modem, a situation I am not thrilled with, but I wanted to eliminate problems. Sure enough, everything works great when run straight through, so this narrows down my candidates to my Linksys BEFSR11 router or my Dlink switch. Turns out, this was a combination of two issues.

First, the firmware on the Linksys router was corrupt. I don’t know how it got corrupt, but it did. Of course, updating it was not easy, considering TFTP was failing, and the management web pages upgrade page would not load the firmware properly. To resolve this issue, I had to hold down the reset button for 30 seconds (and because I am overly paranoid, I did this a few times), disconnect all cables from the router except the PC, and then it finally took a downgrade in firmware. Once I completed the downgrade, I was successfully able to re-upgrade the firmware.

This resolved the failure to download via FTP issues. Since the firmware was upgraded successfully, I was able to download the routers manual from online. In the troubleshooting section, I read an interesting tidbit about web pages loading incompletely. The resolution for this issue was to turn off full duplexing from the PC’s nic card. Well, that tipped me off to something. Previously I didn’t have the Dlink running directly into the router, I had used an older, slower 10Mbit hub, while the Dlink is a 100Mbit switch. Once I swapped out the switch for the hub, everything worked like magic. Now both Xboxes see the NAT as open (I didn’t even have to enable UpnP), and my latency issues dropped. What a PITA. This setup is fine since I only need 100Mbits inside my LAN. It didn’t occur to me to use the hub since I haven’t quite unpacked all my equipment yet, and my IDS system has not been setup on my local network.

Thursday, May 25, 2006

Admin: More tools to Asist Admins

Yesterday I mentioned using the BeyondLogic shutdown tool. I had a comment about using the Sysinternals psshutdown utility. This was an excellent suggestion as this was the tool I had used previously, and I liked it a lot. It did have a lot of power, but it was the tool that stopped working when some domain policy was changed (I wish I could point out which one, however I haven’t setup a lab to test it out).

But this did bring up a good point. I typically go on about how great the Cygwin tools are for doing scripting and admin work. Unfortunately, I do neglect to mention that it is not the only set of tools I use. Sysinternals sets of tools are also excellent.

For example, one of the tools I use is the PSKILL utility. This will kill processes, and for me works better than the Task Manager End Process command. Looking at the below example, here is a process that is being stubborn. When I try to do an End Process on it, it will not terminate for whatever reason, as illustrated in Figure 1 below.

Figure 1: Stubborn Process

This is unacceptable, so I use pskill to terminate the process, as illustrated in Figure 2.

Figure 2: Using PSKILL to terminate process.

Take that stubborn process. Another useful tool is the PSLOGGEDON utility, which will determine who is logged in to a machine, both locally and remotely. Figure 3 demonstrates two methods of running PSLOGGEDON, one is running just the command to retrieve local users, the other us piping the results through GREP to remove the Sysinternals header. I prefer method 2 since it is easier to work with in scripts.

Figure 3: Using PSLOGGEDON

Another useful Sysinternals tools is Sdelete, which is a tool for deleting files in a manner that securely deletes files compliant to DOD standards. Richard Bejtlich discussed this topic previously for formatting disks. And another useful tool, if you’re managing a large group and support helpdesk functions is the BgInfo tool. This will generate wallpaper with useful information such as IP Address, Architecture information, memory, hostname, software version, etc. Useful tool, and with a little creative scripting, it can be used in conjunction with users individual wallpaper preferences to allow them their own wallpaper choices without cramming a standard image onto everyone machine.

Another tool I use, especially in an environment like mine where Ethereal is on the restricted software list, is IPTools. This is a decent packet capture tool in environment where installing WinPCAP is not an option and you need a driverless packet capture utility. It utilizes the Windows RAW packet capture mode, so this may not work on all versions of Windows.

Wednesday, May 24, 2006

Admin: Auto-rebooting Windows 2000 Nightly

I am not sure what it is about our operating environment, but not only is it locked down, but it’s unstable. I don’t blame our SA’s for this situation, however, because I know they aren’t the ones responsible for this. I blame our technology solutions group, whom have too much power within our organization and too little understanding of technology in general, and business requirements for each functional unit in particular. But that’s a political issue, and another story. So for me, a nightly reboot is a definite must. But one of the strange things is I cannot just issue a shutdown command using the task scheduler, for some reason the request is completely ignored. My best guess is this is due to some botched domain right issued by our esteemed solutions provider. I tried several different shutdown commands, and to no avail. I have, however, found 1 that does do the trick very well for our finicky Windows 2000 desktop from BeyondLogic.

The instructions on their site are incredible thorough. But for grins, here is how I have mine setup. Like almost all of my scheduled tasks, the executable for the program resides in C:\auto_rpt\bin. To schedule the task, I simple ran the following command from the DOS prompt:

at 22:00 /interactive /every:M,T,W,Th,F,S,Su c:\autp_rpt\shutdown.exe –s reboot –f -l 1

Now, every night at 10:00 PM, my computer reboots for me. Typically I am not in the office at 10:00 PM, so this does not disrupt my workflow. The only drawback to this program is it does not make an entry in the event log to verify a restart. Fortunately it is not difficult to verify a restart, since the Event Log service does make an entry when it is stopped and started, not to mention the startup entry in the event log.

Tuesday, May 23, 2006

Ipod: Cucusoft DVD to Ipod Converter

As I mentioned here, I managed to get my hands on an Ipod Video 60GB. With my music transferred over (or at least the music that I want), I still have about 40 GB left over. So I decided to fill it up with movies for those boring flights. After trying out several DVD ripping programs that are simple 1 click and transfers, I decided on Cucusoft Ipod Video Suite.

Despite a few drawbacks, this program, for me, worked the best. Almost all of the other programs I used ran afoul of the “Lip Sync” issue, which is where audio and video to not sync up correctly. I suppose that these units do not utilize a time code sync track or anything. I did not run into this problem using Cucusoft. I utilized the trial version to test it out, and outside of the annoying “Trial Version” banner stamped across the screen, this program works perfectly. This banner does not exist in the full version. I do, however, feel that 39.95 is a little steep for a program that seems like nothing more than parts of a program cobbled together from other programs. The reason I say this is due to the inclusion of various DLL, such as LAME, in the program. I may be off base on that assumption. Also, once opening a DVD, if I go to the “Input” menu under settings, it crashes the program. If this menu was not meant to be accessed once a DVD is open, it should be grayed out or hidden altogether. Regardless, the programs actual performance is definitely up to snuff, and outperformed the other programs I evaluated. Once converted, movies are definitely watchable on the Ipod with no sync issues, the sound quality is good, and the program is fairly easy to use. The only complaint I have about the actual ripping process is that the user needs to manually select the titles to rip. If a user doesn’t know to look for the title with the longest duration, they wouldn’t get the movie, and I personally don’t want to watch the extras on my Ipod. Despite my minor gripes, I am happy with the results.

Monday, May 22, 2006

Programming: On Being Verbose

When creating an application, it is important to use descriptive message to inform the user of whats going on. I take this idea from the “Unix Philosophy”. Eric S Raymond spells this out very well in “The Art of Unix Programming”.

The below error message is an example of what not to use as an error message. And to think, the issue that caused this little gem was a permission issue on the application folder. I think in this case, I almost would be better off without an error message at all.

Friday, May 19, 2006

IPod Video 60 GB Review

I am not much of a “Gadget Guy”, but I do have my fair hare of convenient electronics. My recent purchase was an Ipod Video 60GB music player, and I have to admit, I am very impressed with this device. My previous MP3 player took a nosedive on me from excessive rough use. So I weighed my options between the Ipod, the Creative Labs Zen Vision:M, and the Iaudio XS. Although the Zen was a better handheld unit, the Windows XP only support was enough for me to count that one out. The availability of the Ipod was what ultimately helped me decide.

The Ipod does pretty much what you would expect from an MP3 Player, it plays music. The size of the hard disk was a big deciding factor for me; it stores all the music I had on my MP3 server with room to spare. The music playback quality is fairly decent, at least with the stock headphones. I don’t have a particularly high quality sound system setup at the office for testing sound quality, but for the most part I am happy with it. I’ve actually found this useful for not only listening to music, but also using my instructional Spanish CD’s to a quick study on the go.

The big kicker for this device is the video playback feature. So far I have converted a few AVIs of movies that I had previously pulled for playing on my Pocket PC. The conversion didn’t go as planned, and the A/V sync is way off. I want to give some of the other suites for ripping DVD’s a try. Having a movie to watch really helps on the treadmill, where sometimes Music isn’t enough to keep me motivated. From what I saw, however, the video playback quality was fairly decent, and watching movies on such a tiny screen was not nearly as painful as I thought it would be.

While I love my Ipod, there are plenty of downsides to it. The biggest complaint I see, and I totally agree with, is the music management is horrendous. Itunes is total crap, as there is not real method of managing folders of music, which is how I have everything broken up on my music server. The Autosyncronization feature of Itunes is a nightmare, so I advise keeping it turned off, unless you want Itunes to wipe out music that you have on the Ipod that is not in its local “library” (i.e. If you plug it in to a friends computer with this feature, it wipes your music). There are plenty of 3rd part music managers available that allow better music management, and even to copy from the Ipod back to a PC. Out of the box, it comes with absolutely no protection save for a measly white sleeve. This wouldn’t be a problem, except the sleeve has no way to attach to anything, and it does nothing to protect the screen of the Ipod. I tried a few covers, but ultimately settled on an InCase Neoprene Case, mainly because it has a screen protector and a belt clip. And even though I got the black model, the headphones are still white, which in my opinion makes someone easily identifiable as an Ipod owner and a target for thieves.

Outside of a few complaints, overall I am very impressed with the Ipod. I feel it was a worthwhile purchase. I would recommend this to others.

Thursday, May 11, 2006

System Management Mode Article

I was reading this article on OsNews.com about using System Management Mode to circumvent OS security. At first, when I was reading the article, this sounded a lot like switching to Real Mode, which isn’t all that interesting. However, I came across the actual paper here that explained this a little more in depth. I was unaware that there were more operating modes than Real and Protected mode, apparently there is also a Virutal-8086 mode and the System Management Mode mentioned in the article. Interesting stuff.

Tuesday, May 09, 2006

Technology: Biodiesel as an Alternative Fuel Source

Below is a paper I had written with a group about the use of BioDiesel as a contingency fuel source in the even of a spot fuel shortage similar to what occurred during Huricane Katrina. I felt I would post this due to the issue of rising gas prices and my personal opinion on BioDiesel as an alternative and renewable fuel source. While this does not address the consumers concerns, it does address keeping emergency, military, and commercial vehicles operating. The paper is an older paper, however I feel that the topic is still relevant since this rising fuel costs have brought this topic back to mind for me. I would like to thank Bobby Johnson and Tuputala Taele Jr for their contributions to the article. One thing to note, this was a touchy subject with the personal interviewees, so their indivudal names were removed from this article. I found it strange that noone wanted to talk about Biodiesel, I suppose that Big Oil has these guys scared. After all, Texas is Big Oil country.

With recent world events, we have been made aware of the shortcomings in the current fuel supply chain. Finite resources, changing political climate, and natural disasters threaten the readily available petroluem that we use as a source of fuel. It is time that we start to consider the use of an alternative source of fuel that is renewable, available for use and production in the State of Texas, and can work with existing vehicles in order to maintain our the critical infrastructure of this country. Fourtunatly there is an alternative already out there to keep our commercial and government vehicles running in the event of another disaster – BioDiesel.

Biodiesel is fuel made from renewable resources, is biodegradable and has significantly fewer emissions than petroleum-based diesel when burned (Wikipedia). In 1898, when Rudolph Diesel first demonstrated his compression ignition engine at the World's Exhibition in Paris, he used peanut oil - the original biodiesel. Diesel believed biomass fuel to be viable alternative to the resource consuming steam engine. Vegetable oils were used in diesel engines until the 1920's when an alteration was made to the engine, enabling it to use a residue of petroleum - what is now known as diesel #2, and is still used to this day. During the 1970’s fuel shortages, the Diesel type engine was incorporated into all sorts of technology. Vehicles such as cars, trucks, school buses, generators, farm equipment, construction equipment, emergency vehicles such as fire trucks can all run on diesel fuels or have some variation with a diesel engine. All of these can be run off Biodiesel or a Biodiesel blend with no modification.

Biodiesel is offered in any number of mixtures. It can be 100 percent Biodiesel, or can be blended with existing diesel to provide a diluted mixture. There are benefits to going both ways on the mixture scale. Mixtures that contain a higher percentage of Biodiesel are cleaner burning, more energy efficient, and has the potential for a larger long-term economic savings when more supply is available. Lesser percentage mixtures provide a higher compatibility with existing diesel vehicles, especially in older vehicles, and has a larger short-term cost. The most common mixture available on the market is B20, which is a blend of 20 percent Biodiesel and 80 percent regular diesel.

The largest benefit that Biodiesel offers is the reduced impact on the environment and human health. Regular diesel pollution has serious effects on the human health. In 2004, there was Diesel smog related 879 deaths in Texas last year (Diesel Pollution Suggested as Responsible for 879 Deaths in Texas Per Year). Less serious impact includes aggravation of respiratory problems. To illustrate this, in the Dallas/Fort Worth Metroplex there are 63,758 children with asthma, 208,835 adults with asthma, 137,717 people with chronic bronchitis, and 36,099 people with emphysema (BioWillie Articles of Interest). The symptoms of all of the above diseases are stimulated by diesel pollution. Studies also show that there is a 70 percent risk of cancer caused by air pollution comes from diesel exhaust. Biodiesel is the only alternative fuel source to meet the 1990 Clean Air Act. The environmental advantages can be broken down into two major categories, the number of reduced pollutants that Biodiesel produces, and the fuel efficiency of Diesel engines over Petrol engines allowing for a reduction in the pollution per gallons. Lets look at the leading environmental contaminants produced by regular diesel and the amount of reduced pollutants Biodiesel provides.

Biodiesel has 78 percent reduction in carbon dioxide emissions. Carbon Dioxide is considered to be one of the most abundant “Greenhouse Gases”. Since the industrial revolution, CO2 emissions have risen significantly. Things such as factories, automobiles, and other industrial machinery produce these gases. With the continued industrialization of our society, it will probably continue to grow. It is debatable how harmful the increase in CO2 really is, since CO2 is released by plants and is necessary for life, however it is known that CO2 is directly related to the increase in surface water temperature. (Environmental Effects of Increased Atmospheric Carbon Dioxide). A 78 percent reduction can lead to a possible decrease of 585 Megatons of manmade CO2 emissions over a ten-year period, helping to reduce the rate in which global temperature is rising.

According British Government studies (Principles for Evaluating the Human Health Risks from Petroleum Hydrocarbons in Soils), Petroleum Hydrocarbons are a leading contaminate of soil and dependent ecosystems. Diesel engines output about 400 ppm of Hydrocarbons (Frequently Asked Questions About Diesel Emissions). Biodiesel reduces this type of pollution by 70 percent, bringing that number down to 280 ppm.

Carbon Monoxide is an odorless, colorless gas that has toxic side affects. People can suffer Carbon Monoxide poisoning from the amount of Carbon Monoxide that is produced in modern fuels. Diesel outputs 500 ppm per cycle of Carbon Monoxide (Frequently Asked Questions about Diesel Emissions), increasing this potentially lethal threat. Biodiesel can give a 40 percent reduction in this, reducing that amount to 200 ppm.

The remaining pollution consists of particle matter that remains in Diesel engine smoke. Biodiesel produced 50 percent of the smoke that regular diesel does. Physical particles have the same effect as asbestos, causing internal cuts to the respiratory system.

Biodiesel has an unexpected positive side effect in that it provides a method to recycle grease used in restaurants. Normally, restaurant owners pay large sums of money to companies to dispose of grease and animal fats, which usually end up being dumped into a landfill or being used in animal feed. Biodisel provides a useful way to dispose of these byproducts. Kits that allow for animal grease and excess vegetal oil allow for another biofuel alternative for vehicles. When these kits are coupled with Biodiesel, which is used to provide enough energy to start the motor, a vehicle can be modified that will both reduce pollution, but efficiently recycle another form of pollution. (Recipe for Car Power: Heat Vegetable Oil, Flip Switch, and Go).

Today's diesel engines provide 20 to 40 percent better fuel economy and offer more torque at lower rpm when compared to their gasoline counterparts. (Diesel, Dirty No More). This increased fuel economy, when combined with the additional 20 percent energy efficiency of Biodiesel, goes a long way to increase fuel economy and decrease pollution. If we equate 1 gallon of regular Diesel to 1 gallon of gasoline, we limiting are Petrol consumption by 20 to 40 percent. With the reduced amount of fuel consumption, a B20 mixture of Biodiesel can significantly reduce the amounts even more.

Manufacturing of Biodiesel happens by a process known as Transesterification, which is a technique to distill vegetable oils in use since the mid-1800’s. It was originally used to distill out the glycerin used for making soap. The "by-products" of this process are wood based methyl esters and grain based ethyl esters, which is used in Biodiesel. Any source of complex fatty acid can be used to create Biodiesel and glycerin. Early on, peanut oil, hemp oil, corn oil, and tallow were used as sources for the complex fatty acids used in the separation process. Currently Soy is the most widely used virgin stock used to manufacture Biodiesel.

There are a number of alternatives to Soybean that are far more efficient. By comparison, crops such as Rapeseed and Palm Oil produce far more oil that is capable of being used for Biodiesel production than Soy. For example, Rapeseed can produce 1000 kilograms per Hector versus Soy’s production capabilities of 375. Palm Oil outperforms both with 5000 Kg per Hector. With appropriate subsidies, future Biodiesel producers can be enticed to use more efficient crops, allowing for cheaper production yielding higher returns. Research is being done into oil production from algae, which could have yields
greater than any feedstock known today.  
There are fiscal benefits offered to Biodiesel production on 3 levels: subsidies for the farmers, subsidies for the manufacturers, and subsidies for the distributors. For farmers, the federal government offers a Soybean subsidy for farmers with a Soybean crop. While Soybean is not the most efficient producer of Biodiesel, it is the most subsidized crop that can produce oil used to make Biodiesel.

The government also offers a subsidy to the Biodiesel producer by contributing to the purchase of a railcar of soybean, and is subsidized for the production of Biodiesel. For example, Greenstar Products received a $2.50 subsidy per gallon for Biodiesel production in 2004 (Biodiesel Subsidies).

And finally, the blender and retailer gets a dollar off each gallon of Biodiesel they sell. There is also an additional 1-dollar off Excise tax for each gallon produced and 50 cent tax break for Biodiesel made from recycled sources (US Biodiesel presentation before the Brazilian Institute for Petroleum and Gas).

Texas is growing increasingly dependent on diesel fuel. Currently there are 793,852 registered diesel vehicles in the State of Texas (Texas Department of Transportation). Texas has an on-road diesel consumption rate of roughly two billion gallons per year. (Texas OK's Tax Relief for Water Portion of Diesel Fuel Emulsions). In 2004 alone Texas consumed 3.31 Billion gallons of diesel fuel, and YTD for 2005 we have consumed 299.5 Million gallons of diesel fuel. (Texas Production and Consumption). With the incentives, statistics have shown tremendous growth in Biodiesel production capacities over the past 6 years, paving the way for enough growth to meet the growing demand for diesel fuel. In 1999, less than half a million gallons of Biodiesel were being produced. In 2004, this number increase dramatically to 30 millions gallons of Biodiesel. And 2005 is set to break that number once again with the 150 new Biodiesel manufacturing plants underway under construction. Out of those, 36 of these were scheduled to go online in April of 2005, yielding an output capacity of 500 Million gallons per year annually. When complete, the 150 plants will be capable of producing 2 billion gallons of Biodiesel. While this is still a small percentage of the 55 Billion gallons of Diesel fuel consumed in the US, it can be used to produce a smaller mixture to help alleviate stress on the petroleum supply. Trucking fleets of about 31 trucks and trailers could carry the produced deposits totaling to 12 million miles a year.

Regionally in the State of Texas, several locations act as both manufacturers and distributors. Some key distrubution companies include DFW Biodiesel Incorporation (DFW, 2004) and Truman Arnold Companies (Truman, 2005). DFW acts as a retail supplier of biodiesel and biodiesel lends in the Dallas/Fort Worth metroplex, serving to decrease the reliance we’ve carelessly put on the pollutanting fossil fuel derivatives.

Biodiesel works in any diesel engine with few or no modifications to the engine or the fuel system. Biodiesel has a solvent effect that may release deposits accumulated on tank walls and pipes from previous diesel fuel storage. The release of deposits may clog filters initially and precautions should be taken.

In conclusion, we have demonstrated the financial and environmental benefits of Biodiesel. When reviewing the high costs associated with other alternative fuel systems, many fleet managers have determined biodiesel is their least-cost-strategy to comply with state and federal regulations. Use of biodiesel does not require major engine modifications, meaning operators keep their fleets, their spare parts inventories, their refueling stations and their skilled mechanics. Currently, it is estimated that Biodiesel will cost about 10 cents more at the pump than regular diesel. But that is a small amount when you consider the increased energy efficiency, the reduction in air bound contaminants to the environment, and the reduced dependency on foreign suppliers. With backing from the State of Texas, this can be implemented on a much larger scale to help alleviate a potential disaster in the event of a spot shortage. With a State sponsored program, we can ensure that the critical infrastructure comprised of commercial and government transportation do not come to a halt in the event of a disaster.
- Texas Department of Transportation (10-2005) Request for Information
- (2004) DFW Biodiesel homepage. http://www.dfwbiodiesel.com/
- (2005) Truman Arnold Companies. http://www.trumanarnoldcompanies.com/contact.htm
- (2005) Wikipedia. http://www.wikipedia.org/
- Gene Murray (2005) Diesel Pollution Suggested as Responsible for 879 Deaths in Texas Per Year http://www.wh-m.com/mt/archives/2005/03/diesel_pollutio.html
- BioDiesel Emissions http://www.biodiesel.org/pdf_files/fuelfactsheets/emissions.pdf
- Environmental Effects of Increased Atmospheric Carbon Dioxide http://www.oism.org/pproject/s33p36.htm
- (10-2003) Principles for Evaluating the Human Health Risks from Petroleum Hydrocarbons in Soils http://www.environment-agency.gov.uk/yourenv/consultations/504965/?version=1&lang=_e
- Frequently Asked Questions About Diesel Emissions http://www.nett.ca/faq_diesel.html
- BioWillie Articles of Interest http://www.wnbiodiesel.com/articles.html
- (6-2001) OK's Tax Relief for Water Portion of Diesel Fuel Emulsions http://corporate.lubrizol.com/PressRoom/news/2001/0620-texas.asp
- Window on State Govt. Texas Production and Consumption http://www.window.state.tx.us/ecodata/prodcons1.html
- Dixon, Chris New York Times Recipe for Car Power: Heat Vegetable Oil, Flip Switch, and Go
- Mello, Tara Baukus (11-2005) Diesel, Dirty No More http://www.edmunds.com/advice/specialreports/articles/93338/article.html
- Fuel Economy Government Website 2006 Model Year Vehicles http://www.fueleconomy.gov/feg/FEG2006_GasolineVehicles.pdf
- Biodiesel Blog (3-2004) Biodiesel Subsidies http://biodieselblog.com/2004/03/biodiesel-subsidies.shtml
- (06-2005) US Biodiesel presentation before the Brazilian Institute for Petroleum and Gas http://www.unr.edu/coba/logis/executive_education/Jess%20Hewitt%20June27.pdf

Wednesday, May 03, 2006

ASM: Changing String Case

For fun, I pulled out the ‘ol assembler for a little bit of low level programming. The goal was to write a small (COM sized) program that will take the input from a user using DOS interrupts, change the case of the string, and display it on the screen using DOS interrupts. DOS has a whole slew of interrupts/functions for I/O, so I picked function 0ah for input, which is a powerful input function allowing for a numeric limitation on string sizes similar to using fgets (CHAR_STRING, 50, stdin) in C. This program also demonstrates the basic low-level concept of changing a characters case, which is done through a simple bit mask. The program is below.

Title change_case_of_string_demo
     ;Set to the Tiny memory model, used for COM files and small EXE
     .model tiny
     ;Start the code segment. This will be a single segment program, so no stack or data segments are declared
     org 100h
     ;First, jump to the main program
BEGIN:     jmp main

     ;Our psuedo, Data Segment
     MAX_LEN DB 50 ;The max length of a string
     ACT_LEN DB ? ;A blank uninitited value, will store the actual string length
     CHAR_STRING DB 50 DUP(' ') ;The buffer to store input from the user

     ;Set up 0aH/21h for user input using the PARA_LIST label, which has the MAX_LEN, Act_Len
     ;and CHAR_STRING memory areas
     mov ah, 0ah
     lea dx, PARA_LIST
     int 21h
     ;Set CL to the actual length of the string retrieved from the user, and load the
     ;effective memory address of CHAR_STRING into BX
     mov cl, ACT_LEN
     lea bx, CHAR_STRING
     ;Begin changing case
     ;Move value pointed to from BX into AX and XOR the 6th bit to change its case, and
     ;move it back
     mov al, [bx]
     xor al, 20h
     mov [bx], al
     ;Increase the pointer and loop
     Inc bx
     ;Clear bx, and set BL to the size of the string
     xor bx, bx
     mov bl, ACT_LEN
     ;Set the last character in the string to a $, which is what the
     ;Goofy DOS functions use as a string terminator
     mov CHAR_STRING[BX], '$'
     mov ah, 09h
     lea dx, CHAR_STRING
     int 21h
     ;Exit program
     mov ax, 4c00h
     int 21h

Once the program, has been written, I assemble it using the below command using Turbo Assembler.

H:\TASM>tasm code\make_low.asm
"C:\PROGRAMCannot load VDM IPX/SPX support
Turbo Assembler  Version 4.1  Copyright (c) 1988, 1993 Borland International

Assembling file:   code\make_low.asm  to  make_low.OBJ
Error messages:    None
Warning messages:  None
Passes:            1
Remaining memory:  452k

And I link the program using Turbo Link. I use the /t option to output a COM file instead of a EXE file.

H:\TASM>tlink /t make_low.obj
Turbo Link  Version 7.00 Copyright (c) 1987, 1994 Borland International

I test the program below. Although not demonstrated, the program takes in typed text and outputs on the exact same place. Apparently the input function did not change the cursor location.