tag 标签: ascii

相关博文
  • 热度 20
    2012-1-27 18:57
    1586 次阅读|
    0 个评论
    Note: This "How it used to be" s tory is told by my old chum Chris Lewis. We both worked at a company called Cirrus Designs in the 1980s in Manchester, England. Chris saw my recent article How it used to be: Meeting my first microcomputer and immediately emailed me to say "I have some stories of my own." The tale below is brilliant; hopefully this will be the first of many... I was one of those kids who took everything apart to see how it worked, much to the annoyance of my parents. When I started playing with electronics my mother told me to be careful. The only computers she had seen were on Star Trek , and they blew up in showers of sparks every week throwing some unknown crewman across the bridge. When I got to Leigh Grammar School in Lancashire, England in 1973 aged 11, (the school had been going since at least 1655), there was no IT training on the curriculum, but we had an enthusiastic teacher, Mr Sagar, who ran the Computer Club after school. I don't know what we'd have done without teachers like that, who gave up their free time to share their enthusiasm with us kids.   Chris in a high school photo (back row, 4th from the right!) The first thing we learnt was a programming language called Computer Education In Schools Instructional Language ( CESIL ) which was like a simplified form of assembly code. Our coding consisted of filling in "lozenges", using a 2B pencil, on punched cards which were pre-printed with CESIL commands. We'd then put an elastic band round the cards and they would be posted off to the council for running on the Wigan Council Rates computer. With luck you'd get the results a week later, and if you were lucky your program would have been read correctly (if you pressed too hard the depression stopped the reader working) and if you were very, very lucky you had no bugs and might have actually been able to add some integers together and print out the result. This was VERY exciting; you have to remember that pocket calculators were still a couple of years away then.   Chris "Then" (left) and "Now" (right) Once we had grasped the basics of input and output and learned a little about the Turing Machine, we moved onto learning BASIC with its line numbers and REM statements. At first, our efforts were captured on coding sheets with a pre-printed (on the school office duplicating machine) grid with space for the line numbers, keywords and operands. These would be posted off to the council again, where typists would type it all in, exactly what we had written, mistakes and all. By this time Mr Sagar had been joined by Mrs Johnson the maths teacher, the only female teacher in an all-male school. We learned about random number generation and a popular program was the "Poem Program" she taught us. This took strings of words and would randomly jumble them into poems, being teenage school kids we tried to make it say rude things, often about Mrs Johnson. She took it all in good humour though. Now we had our own club-room, well actually it was the "Medical Officer's room" but as there wasn't a Medical Officer despite what it said on the door, and it was only ever used for the "cough" test once a year. There was also a cupboard where Mr Langley kept all his wigs from The Mikado, but that is another story. We also had a couple of innovations, a hand card punch which was an ancient thing but if you could learn your ASCII alphabet and you had the fingers of a pianist, you could actually punch your cards yourself, rather than writing coding sheets. And we also had the height of modernity, a teletype, with its paper tape punch. I remember someone once tipping the waste container over my head, with its tiny circles of paper, I shook them out of my hair and then was most annoyed at how unfair it was that I had to stay behind after school to vacuum out the keyboard. We still weren't "on-line" though. We wrote our programs, typed then into the Teletype and punched our paper tapes which we left rolled up with an elastic band. Mr Sagar would then laboriously join them all into one long paper tape using the Teletype copy facility and upload them to the council computer in the evening, using a 300 baud acoustic coupler with the phone handset fitted into its rubber cups. The results came back in the post a week later. I do remember Mrs Johnson coming in once, with the results of our programming efforts, with a stack of green music ruled paper. We were supposed to have written a program to generate 10 random numbers. She handed the club members their results, tearing off a couple of pages each, and then she got to mine. There was about an inch high stack of paper, all covered in random numbers. My loop test had been wrong, and the program had gone into an infinite loop, churning out pages and pages of random numbers until someone noticed and turned it off. At age 16 in 1978 we went off to the local Tertiary College and there was rumour that they had an actual computer on the premises. I had seen two actual computers before, on school trips. Once we went to Preston Polytechnic to see their computer, and they printed out posters of The Flintstones for us, in ASCII characters on the ubiquitous green music ruled paper. Another time we went to see the Daresbury Nuclear Physics Laboratory in Cheshire, England and amongst other things we were shown the computer room. There was a vast room full of disc drives, tape drives, card readers and such, and at one end was some rather comfortable looking seating arranged in a circle, so we sat down. This seating turned out to be a multi-million dollar Cray-1 Supercomputer which they had on-loan, and which out-performed the entire room of computers they told us. They weren't too happy to have school kids sitting on it as I remember. Apart from the school trips the only real computers I had seen before were on TV, and usually consisted of banks of rotating tapes and panels with lots of flashing lights. Near my desk in the maths classroom was a tall grey metal cupboard with steel doors. I assumed this was the college computer and I imagined I could hear clicks and noises coming from inside. It turned out that it was just a cupboard, and the Computer was a brand new RM 380Z , an early Z80 based 8bit educational computer running CP/M mounted into a rack at the back of the room. By now computing was part of our maths classes as well as an after school hobby. With a few dozen maths students and one computer, you still had to share it, but the magic of typing in a program, and seeing the results on the screen, in real time, was always a joy. I feel I should say something about "The kids today" and things like "Xbox 360s" and how young people can all download the latest games but know nothing about programming, but I feel so old already, so I won't (but I have! :-)  
  • 热度 16
    2011-10-28 09:58
    1686 次阅读|
    0 个评论
    As I mentioned in my previous "How it used to be" article, I started my first job after graduating university in the summer of 1980 at International Computers Limited (ICL) in West Gorton, Manchester, England. This was one year before the introduction of the first IBM Personal Computer (PC), which would eventually be presented to the market on 12 August 1981. Having said this, even in 1980 there were a number of small (desktop-class) computers around. At that time, computers of different types from different manufacturer could not typically "talk" to each other. Actually, if the truth be told, it was hard enough to get two computers from the same manufacturer to talk to each other. There was little (if anything) in the way of standard network protocols or file formats (even ASCII and EBCDIC came in multiple flavors); in fact, everything was something of a hodge-podge. One day (sometime toward the end of 1980 or in the early part of 1981), my boss invited me to a demonstration in which a mainframe computer had been connected to a desktop computer via a relatively rudimentary, internally-developed network. The demonstrator commenced by creating a simple text file on one of the computers and saving it. I can no longer recall if the file was then copied over to the second computer, or whether it was possible for the second computer to access the file while it was still resident on the first (I suspect the former). But the point was that the same file could somehow be opened, viewed, modified, and passed back-and-forth between two dissimilar computers. I know this doesn't seem to be particularly "earthshaking" in these days of wireless home networks and the Internet, when everyone is uploading, downloading, emailing, and sharing all types of video, audio, text, and other data files between a multitude of totally disparate systems ... but in those days of yore this was truly revolutionary. When I say "revolutionary" I really mean it. This was such a breakthrough that the national newspapers sent journalists by train from London (about 180 miles away) to observe the demonstration, which was duly reported in breathless terms. One reason I personally recall the occasion so well is that tea and sandwiches (with posh fillings and the crusts cut off) were served – an unexpected bonus for a junior engineer.  
  • 热度 16
    2011-10-23 11:06
    1574 次阅读|
    0 个评论
    Some my recent writing projects have required me to capture and present equations, and it was not sufficient for me to use regular text like: y = (a + b) / (c + d) So I was rather interested when one of my colleagues sent me an email saying: I have found a nice on-line equation writing tool at CodeCogs.com ( Click here to see this tool). You type in LaTex or MathML and it creates an image of the formula. You can then take that image and put it on your website. Alternatively, you can take a link CodeCogs creates to its domain that will show the same image. The nice thing about the image link is that the text-based LaTex expression forms the "Alternate Text" field of the link. You can go find most any equation in Wikipeda, then hit the "Edit" link to see the LaTex MathML type text expression. Just cut-and-paste that into the CodeCogs window and it will create the formula as an image. I find it works best at 300 dpi and the largest size. This makes a big gif file, but then you can shrink it down with the size format in the HTML page you are writing. This way the formula is much sharper and when you print your page the formula looks great since the printer drive will call on the native high resolution of the gif image when it prints. This is much better than using the image from the Wikipedia page. Here is Gauss's law: \int\!\!\!\!\!\!\!\!\;\!\;\!\subset\;\!\;\!\!\;\!\!\!\!\!\!\!\int_{\partial V}\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\;\;\;\;\!\!\supset \mathbf E\;\cdot\mathrm{d}\mathbf A = \frac{Q(V)}{\varepsilon_0} Paste this into CodeCogs and enjoy... I just did this, which resulted in the following image:   The only problem for me is that I don't know LaTex or MathML, but I'm sure that this tool will prove useful to a lot of folks. In a moment I will tell you about another equation-generating tool, but first Jack Olsen sent me an email with a link to a YouTube video titled Miss USA—Should Math be Taught in Schools? The dialogue is wonderful – it made me laugh out loud. Like when one lady says "You really don't know what the square root of sixteen is ... no one does." Or when another says "There are numbers everywhere ... on phones ... on houses ... on microwaves..." Jack's accompanying comment was "This has to be a joke ... someone PLEASE tell me this is a joke..." Yes Jack. Settle down and chew on a Dried Frog pill. It is a joke. But I have to say that it's a good one that is really well done – I plan on showing it to my son this evening. Now if you are a user of Word, there is a really tasty equation editor available to you. My understanding is that this used to be presented as a separate utility – but the first I was made aware of it was recently when my chum Brian pointed out that it was embedded in Word 2010. I must admit that I had seen it next to the Symbol command on the Insert menu system ... it had just never struck me to click this icon before (don't I feel silly now?). When you do click this icon, you are presented with a suite of templates, which provide a really good starting point:     Brian also told me about another clever trick, which is that if you open Notepad (or any text editor or command prompt or...) and hold down the Alt key while simultaneously typing the appropriate decimal number, the corresponding ASCII character will appear when you release the Alt key; for example: * Standard Example: Hold Alt, type "97" without quotes, then release Alt and 'a' will appear. * Extended Example: Hold Alt, type "128" without quotes, then release Alt and 'Ç' will appear. Click here to see a full list of the Standard and Extended ASCII character sets referred to in Brian's examples. So, do you know of any useful tools or tricks that might prove interesting to the rest of us? If so, please don't hesitate to post a comment to this article and share the joy.  
  • 热度 21
    2011-10-18 16:47
    3264 次阅读|
    0 个评论
    EBCDIC Code(s) The ASCII code discussed above was quickly adopted by the majority of American computer manufacturers, and was eventually turned into an international standard (see also the discussions on ISO and Unicode later in this paper.) However, IBM already had its own six-bit code called BCDIC (Binary Coded Decimal Interchange Code). Thus, IBM decided to go its own way, and it developed a proprietary 8bit code called the Extended Binary Coded Decimal Interchange Code (EBCDIC).   Pronounced "eb-sea-dick" by some and "eb-sid-ick" by others, EBCDIC was first used on the IBM 360 computer, which was presented to the market in 1964. As was noted in our earlier discussions, one of the really nice things about ASCII is that all of the alpha characters are numbered sequentially. In turn, this means that we can perform programming tricks like saying "char = 'A' + 23" and have a reasonable expectation of ending up with the letter 'X'. To cut a long story short, if you were thinking of doing this with EBCDIC ... don't. The reason we say this is apparent from the table shown in Figure 3.       Figure 3: EBCDIC character codes.   A brief glance at this illustration shows just why EBCDIC can be such a pain to use – the alphabetic characters don't have sequential codes. That is, the letters 'A' through 'I' occupy codes $C1 to $C9, 'J' through 'R' occupy codes $D1 to $D9, and 'S' through 'Z' occupy codes $E2 to $E9 (and similarly for the lowercase letters). Thus, performing programming tricks such as using the expression ('A' + 23) is somewhat annoying with EBCDIC. Another nuisance is that EBCDIC doesn't contain all of the ASCII codes, which makes transferring text files between the two representations somewhat problematical.   Once again, in addition to the standard alphanumeric characters ('a'...'z', 'A'...'Z' and '0'...'9'), punctuation characters (comma, period, semi-colon, ...), and special characters ('!', '#', '%', ...), EBCDIC includes a lot of strange mnemonics, such as ACK, NAK, and BEL, which were designed for communications purposes. Some of these codes are still used today, while others are, generally speaking, of historical interest only. A slightly more detailed breakdown of these codes is presented in Figure 4 for your edification and delight.     Figure 4: EBCDIC control codes. As one final point of interest, different countries have different character requirements, such as the á , ê , and ü characters. Due to the fact that IBM sold its computer systems around the world, it had to create multiple versions of EBCDIC. In fact, 57 different national variants were eventually wending their way across the planet. (A "standard" with 57 variants! You can only imagine how much fun everybody had when transferring files from one country to another).   ISO and Unicode Upon its introduction, ASCII quickly became a de facto standard around the world. However, the original ASCII didn't include all of the special characters (such as á , ê , and ü ) that are required by the various languages that employ the Latin alphabet. Thus, the International Organization for Standardization (ISO) in Geneva, Switzerland, undertook to adapt the ASCII code to accommodate other languages.   In 1967, the organization released its recommendation ISO 646. Essentially, this left the original 7bit ASCII code "as was", except that ten character positions were left open to be used to code for so-called "national variants."   ISO 646 was a step along the way toward internationalization. However, it didn't satisfy everyone's requirements; in particular (as far as the ISO was concerned), it wasn't capable of handling all of the languages in use in Europe, such as the Arabic, Cyrillic, Greek, and Hebrew alphabets. Thus, the ISO created its standard 2022, which described the ways in which 7bit and 8bit character codes were to be structured and extended.   The principles laid down in ISO 2022 were subsequently used to create the ISO 8859-1 standard. Unofficially known as "Latin-1", ISO 8859 is widely used for passing information around the Internet in Western Europe to this day. Full of enthusiasm, the ISO then set about defining an "all-singing all-dancing" 32bit code called the Universal Coded Character Set (UCS). Now known as ISO/IEC DIS 10646 Version 1, this code was intended to employ escape sequences to switch between different character sets. The result would have been able to support up to 4,294,967,296 characters, which would have been more than sufficient to address the world's (possibly the universe's) character coding needs for the foreseeable future.   However, starting in the early 1980s, American computer companies began to consider their own solutions to the problem of supporting multilingual character sets and codes. This work eventually became known as the Unification Code, or Unicode for short. Many people preferred Unicode to the ISO 10646 offering on the basis that Unicode was simpler. After a lot of wrangling, the proponents of Unicode persuaded the ISO to drop 10646 Version 1 and to replace it with a Unicode-based scheme, which ended up being called ISO/IEC 10646 Version 2.    
  • 热度 23
    2011-10-14 09:47
    3477 次阅读|
    0 个评论
    Have you heard of this old engineering joke? "Standards are great ... everyone should have one!"    The problem is that—very often—everyone does. For instance, take the case of storing textual data inside a computer, where the computer regards everything as being a collection of numbers. In this case, someone has to (a) decide which characters need to be represented in the first place and (b) decide which numeric values are going to be associated with the various characters. The resulting collection of character-to-number mappings is referred to as a "code". ASCII Code(s) Towards the end of the 1950s, the American Standards Association (ASA) began to consider the problem of defining a standard character code mapping that could be used to facilitate the representation, storing, and interchanging of textual data between different computers and peripheral devices. In 1963, the ASA – which changed its name to the American National Standards Institute (ANSI) in 1969 – announced the first version of the American Standard Code for Information Interchange (ASCII). However, this first version of the ASCII code (which is pronounced "ask-key") left many things – such as the lower case Latin letters – undefined, and it wasn't until 1968 that the currently used ASCII standard of 96 printing characters and 32 control characters was defined as illustrated in Figure 1.   Figure 1: The 1968 version of the ASCII code. (Dollar '$' Characters indicate hexadecimal values) Let's just pause for a moment to appreciate how tasty this version of the table looks (like all of the images in this article, it was created by yours truly in Visio). But we digress... Note that code $20 (which is annotated "SP") is equivalent to a space. Also, as an aside, the terms uppercase and lowercase were handed down to us by the printing industry, from the compositors' practice of storing the type for capital letters and small letters in two separate trays, or cases. When working at the type-setting table, the compositors invariably kept the capital letters and small letters in the upper and lower cases, respectively; hence, "uppercase" and "lowercase." Prior to this, scholars referred to capital letters as majuscules and small letters as minuscules , while everyone else simply called them capital letters and small letters . We should also note that one of the really nice things about ASCII is that all of the alpha characters are numbered sequentially; that is, 65 ($41 in hexadecimal) = 'A', 66 = 'B', 67 = 'C', and so on until the end of the alphabet. Similarly, 97 ($61 in hexadecimal) = 'a', 98 = 'b', 99 = 'c', and so forth. This means that we can perform cunning programming tricks like saying "char = 'A' + 23" and have a reasonable expectation of ending up with the letter 'X'. Alternatively, if we wish to test to see if a character (called "char") is lowercase and – if so – convert it into its uppercase counterpart, we could use a piece of code similar to the following: if (char = 'a') and (char = 'z') then char = char – 32; Don't worry as to what computer language this is; the important point here is that the left-hand portion of this statement is used to determine whether or not we have a lowercase character and, if we do, subtracting 32 ($20 in hexadecimal) from that character's code will convert it into its uppercase counterpart. As can be seen in Figure 1, in addition to the standard alphanumeric characters ('a'...'z', 'A'...'Z' and '0'...'9'), punctuation characters (comma, period, semi-colon, ...) and special characters ('*', '#', '%', ...), there are an awful lot of strange mnemonics such as EOT, ACK, NAK, and BEL. The point is that, in addition to representing textual data, ASCII was intended for a number of purposes such as communications; hence the presence of such codes as EOT, meaning "End of transmission," and BEL, which was used to ring a physical bell on old-fashioned printers. Some of these codes are still in use today, while others are, generally speaking, of historical interest only. For those who are interested, a more detailed breakdown of these special codes is presented in Figure 2.   Figure 2: ASCII control characters. One final point is that ASCII is a 7bit code, which means that it only uses the binary values %0000000 through %1111111 (that is, 0 through 127 in decimal or $00 through $7F in hexadecimal). However, computers store data in multiples of 8bit bytes, which means that – when using the ASCII code – there's a bit left over. In some systems, the unused, most-significant bit of an 8bit byte representing an ASCII character is simply set to logic 0. In other systems, the extra 128 codes that can be accessed using this bit might be used to represent simple "chunky graphics" characters. Alternatively, this bit might be used to implement a form of error detection known as a parity check , in which case it would be referred to as the parity bit .  
相关资源
  • 所需E币: 0
    时间: 2022-8-10 23:52
    大小: 337.71KB
    上传者: samewell
    ASCII及进制转换V4.0.rar
  • 所需E币: 1
    时间: 2022-7-23 17:56
    大小: 1.95KB
    上传者: Argent
    ASCIIGenericProtocolMacroObjectCode
  • 所需E币: 1
    时间: 2022-7-23 17:56
    大小: 25.86KB
    上传者: Argent
    ASCIIGenericProtocolMacro
  • 所需E币: 1
    时间: 2022-7-23 16:33
    大小: 16.49KB
    上传者: Argent
    MicroLogix1500ASCIIInputexample
  • 所需E币: 1
    时间: 2022-7-23 16:31
    大小: 138.33KB
    上传者: Argent
    InView2706-P42Cw-EthernetIPASCIIExampleCode
  • 所需E币: 1
    时间: 2022-7-23 16:18
    大小: 10.81KB
    上传者: Argent
    ASCIIWrite-readtoML1100andR320scale
  • 所需E币: 1
    时间: 2022-7-23 10:31
    大小: 231.04KB
    上传者: Argent
    ASCIIcommunicationwithCompactLogixL35E
  • 所需E币: 1
    时间: 2022-4-3 10:13
    大小: 41.08KB
    上传者: Argent
    PLC技术在工业控制领域应用广泛,分享一些有关实用的三菱PLC参考程序,希望能够帮助到有需要的网友。
  • 所需E币: 1
    时间: 2022-1-8 09:51
    大小: 150.5KB
    上传者: 西风瘦马
    UNICODE字(加入了字母等ASCII)
  • 所需E币: 1
    时间: 2020-5-25 15:23
    大小: 97.93KB
    上传者: Argent
    VB是早期比较流程的编程语言,VisualBasic由微软公司开发,是世界上使用人数最多的语言。它源自于BASIC编程语言。VB拥有图形用户界面(GUI)和快速应用程序开发(RAD)系统,可以轻易的使用DAO、RDO、ADO连接数据库,或者轻松的创建ActiveX控件。程序员可以轻松的使用VB提供的组件快速建立一个应用程序。感兴趣的网友们快来下载,练练手吧。
  • 所需E币: 3
    时间: 2019-12-25 12:38
    大小: 34.02KB
    上传者: 2iot
    MCS-51单片机实用子程序库……
  • 所需E币: 3
    时间: 2020-1-3 18:30
    大小: 3.33MB
    上传者: rdg1993
    目前最新最全面的字库芯片下载资料2……
  • 所需E币: 4
    时间: 2020-1-3 18:30
    大小: 4MB
    上传者: wsu_w_hotmail.com
    目前最新最全面的字库芯片下载资料1……
  • 所需E币: 3
    时间: 2019-12-24 19:14
    大小: 139.91KB
    上传者: givh79_163.com
    Itisoftennecessarytooutputafloatingpointnumbertoadisplay.Forexample,tocheckcalculations,onemightwanttooutputfloatingpointnumbersusingthePICmicro®microcontrollersserialport,orusegeneralpurposeI/Otooutputtoaliquidcrystaldisplay(LCD).Eitherway,thefloatingpointnumbermustbecon-vertedtoitsASCIIequivalent.Thisdocumentshowsaspecificexampleofconvertinga32-bitfloatingpointnumbertoASCII.ApplicationnoteAN575contains24-bitand32-bitfloatingpointroutines.AsubroutineisprovidedherethatdoestheconversionandreturnstheASCIIequivalentinRAM.Anexample“main”programisprovidedtoshowhowtousethesubroutine.MFloatingPointtoASCIIConversionAN670Table2depictsMicrochip’s32-bitfloatingpointregisterAuthors:RickEvansRAMusage.Thebitlabeled“S”isthesignbit.TheseMicrochipTechnology,Inc.registersarecollectivelycalledAARG.ThefloatingpointroutinesrequirethattheargumentsbeputinAARGandBARG(BARGisthesecondargument,sameformatas……
  • 所需E币: 5
    时间: 2019-12-24 16:47
    大小: 37KB
    上传者: wsu_w_hotmail.com
    ASCII最全ASCII码对照表Bin              Dec    Hex        缩写/字符                                      解释00000000    0          00            NUL(null)                                      空字符    00000001    1          01            SOH(startofhanding)                  标题开始  00000010    2          02            STX(startoftext)                          正文开始  00000011    3          03            ETX(endoftext)                          正文结束00000100    4          04            EOT(endoftransmission)            传输结束  00000101    5          05            ENQ(enquiry)                              请求  00000110    6          06            ACK(acknowledge)                      收到通知  00000111    7          07        ……