After my secondary school, while waiting for my exam result to either eligible for further study, I went and look for a short term job.
I found a job in a computer teaching lab, where we deployed a number of Singapore made 6800 based CPU called pico-M. It is a small "pc" with tiny keyboard much like the shrink-down Macbook keyboard. It is connected to either a composite monitor or TV like ZX81. We conduct tuitions and we do sell the so-called computer as well.
Besides, we had been assigned one unit of Sharp MZ-80K, a CP/M based PC with integrated monitor, disk drives, and tape recorder (imagine storing data on conventional music cassette).
My boss, the person in charge for the local tuition centre, demonstrated to me WordStar, running on CP/M-80, the 8080 version of CP/M, of which Sharp's MZ80K processor Z80 is fully compatible with the Intel 8080.
He was then told me that it is unfortunate as the centre is not having enough cash to buy the legal copy of WordStar, and at that point of time, there's virtually no one pirate Sharp MZ80K software as it is so rare in the market, in addition, the tuition centre does not want to run into risk of using pirated copy. The centre have only the demonstration copy which does not allow saving of files. Thus we need to keep retyping the same thing if we need to reproduce/print later after we created a document.
Then he asked if I can look at how WordStar functions, and come out with something that work without paying to our nose.
I accepted the challenge, and started looking at how WordStar functions and what is really important feature to us, and what is not relevant at all for our use.
I have been tempted to use Applesoft BASIC, which is my favourate programming tools at that point. But we do not have Apple II in the centre. Pico-m on the other hand, is a primitive PC, even less feature than ZX81 that I have, although with 1K RAM like ZX81, it does not have good enough programming tools besides general purpose BASIC, a strip-down BASIC interpreter, and machine code.
Furthermore, none of the Pico-m is able to connect to a printer. the only printer, an Epson dot-matrix, was connected to Sharp MZ80K running, besides WordStar, our accounting system.
It took me a good 2 weeks to finish a WordStar clone entirely in CP/M BASIC, with code less than 20K in source, I was able to mimic functionality of WordStar with all formatting features, editing features, printing and load/save document features, less on-screen menu (the habit I have developed since then not to pay attention to user interface (UI) in any of my programs written later until now).
Best of all, documents generated by my application is compatible with WordStar. This allows my boss to submit his reports electronically via modem from Melaka to Kuala Lumpur, without needing to print and send by mail. A breakthrough at that time where computers are island by itself.
Sad to say I have lost the source code after a few shifting in KL. I have printed the source code as a record of my achievement that I was capable of writing commercially viable application albeit it is not my original idea. Ideas are brought in from WordStar. But how I did it in 20K of BASIC code that make me feel good.
This exercise taught me how to handle strings, characters, and user interactions. Since then, I have been very interested in writing string manipulation stuff for the fun of it.
During my tenure with the tuition centre, I visited KL, the capital city of Malaysia, a few times. Mostly wondering around at Imbi Plaza, which is at that moment, the centre of all computer shops in town.
I bumped into a shop selling an Z80 development kit. The kit comes with a hexadecimal keypad, 1K RAM, and LED hexadecimal displays. Primary development language is Z80 assembly, and it has its own BASIC call tiny BASIC, against far inferior than ZX81.
I use the money I earned from the tuition centre and bought the development kit without knowing what I want to get out from there.

