[表紙頁]へ  関連記事の目次へ
[令和元年七月十八日(2019/7/18)]
PC110 TFT化 27 プログラム改善 [to English Note

現在まで、自作プログラム「ct65535.com」は、通常は安定に働いているが、稀に、画面に不具合が発生した時には、“無力”である。(図1)
例えば、表示を「外部ディスプレイ(CRT)」に切り替えたいと思って、「Fn + F7」キーを押してしまった時などに起きる。(図2<クリック>

一旦、“異常表示”状態に陥ると、そこから抜け出すのは容易ではない。
再度、「ct65535.com」を実行し、手動で、LCD表示側に切り替えれば、安定な“TFT_LCD表示”に戻せるのだが、簡単には電源を切る方法しかない。

「ct65535.com」(約1.7KB)の改良を試みていて、やっと、2つのキー(Alt + F7)のワン・タッチで切り替えられる機能を付したプログラムが出来た。
  「ct65535a.exe」(約2.5KB)
しかし、まだ、「PC/MS-DOS」上でしか、ワン・タッチ機能が働かない。
Win95」上では、このプログラムをDOS窓で実行して、手動で切り替える方法しか無い。
更に、プログラムの改良をする予定だ。

−−−−−−−−−−−−−−−−−−−−−−−−−

+++ 「ct65535a.exe」の機能 +++

今回、“1文字コマンド”を変更・統一した。
 l:LCD(搭載LCD_TFT)
 c:CRT(外部ディスプレイ)
 s:stay resident and set to LCD(常駐&LCD)
 r:release from stay(常駐終了)
 その他、x、C、S、Gなどがあるが、省略。

従って、AUTOEXEC.BAT内に書く場合は、
 ct65535a.exe /s実験用zipファイル
とする。
これが常駐していれば、「Alt」キーと「F7」キーを“同時押し”して、表示を「LCD_TFT」か「CRT(外部)」か、に切り替えられる。
しかし、残念ながら未だ、「PC/MS-DOS」上でしか切替効果が無い。
これを、「Win95」上でも、ちゃんと使えるようにしたいと考えている。

+++ プログラムの詳細・解決策 +++

今回の改良作業中に、高テクニックを1つ覚えた。
それは、キーボード割り込み「INT 16H」を横取りする際に、其処にあるベクトル(セグメント:オフセット)を、別の空き割り込み(今の場合、「INT 55H」)に移しておく手法だ。

こうしておくと、私のプログラムが処理を終えた後に、“それを呼ぶ”(INT 55Hをコールする)か、あるいは、処理の途中で、“それを呼ぶ”ことも出来る。(この手法は、ベテラン達の常套手段らしい)
むしろ、これ以外の方法で“INT 16Hのベクトル”だけを(単純に)コールすると、プログラムが暴走してしまう。

左図をクリックして現れる動画は、「外付けキーボード」の「Alt + F7」キーを使って、画面の切替を実験している様子を撮影したもの。


[表紙頁]へ  関連記事の目次へ
−−−−−−−−−−−−−−−−−−−−−−−−−
[English Note]
to Top Page  improvment of the program


PC110 TFT-ized #27  program improvement   [7/18]

To date, the home-made program ct65535.com usually works stably, but it is "powerless" when a problem on the screen occurs. (Fig_1)
For example, it occurs when I would like to switch the display for the "external display (CRT)" with presses the "Fn + F7" key. (Figure 2 <click> )

Once in the "abnormal display" state, it is not easy to get out of it.
Again, if I execute " ct65535.com " and manually specify the LCD display side, it will be able to return to the stable "TFT_LCD display".
In anyway, it may be easy to solve if the power turn off boldly.

I'm trying to improve "ct65535.com" (about 1.7KB) and finally I have a program with a function that can be switched by one touch of two keys ( Alt + F7 ).

" ct65535a.exe " (about 2.5KB)

However, the one touch function still works only on " PC / MS-DOS ".
On " Win95 ", the only way is to run this program in a DOS window and switch manually.
In addition, we plan to improve the program.

−−−−−−−−−−−−−−−−−−−−−−−−−

+++ Features of ct65535a.exe  +++

This time, "one letter command" was changed and unified.
  l : LCD (on-board LCD TFT)
  c : CRT (external display)
  s : stay resident and set to LCD (resident & LCD)
  r : release from stay
In addition, there are x, C, S, G, etc. but they are omitted.
Therefore, if it shall be writen in AUTOEXEC.BAT,

  ct65535a.exe /s zip for experimentals

If this is resident, the "Alt" + "F7" key are "simultaneously pressed" to switch the display to "LCD_TFT" or "CRT (external)".
However, unfortunately, there is still no switching effect only on " PC / MS-DOS ".
I want to make this work properly even on " Win95 "


+++ Program details and solutions +++

I learned one high technique during this improvement work.
When it intercepts the keyboard interrupt " INT 16H ", the vector (segment: offset) should to move another empty interrupt (in this case, " INT 55H ",or " INT 90H ",etc.).

In this way, I can either "call it (call INT 55H) after my program-end" or "call it in the middle of my processing" . (This method seems to be a common practice for veterans)

Rather, if I just (simply) call only the "vector of INT 16H", the program will run away.

The movie that appears when click the left image is an image taken while experimenting with screen switching using the "Alt + F7" key on the "External Keyboard".