How to get current size of terminal window and how to detect changes.
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
#include
EXE program can have any size whereas COM program can have maximally 64kB (just one segment).
At the beginning of program there is program segment prefix (PSP). Because COM program is stored only in one segment so PSP occupies first 256 bytes (100h). Therefore start point begins at 100h. Values of segment registers are set to the begin of segment and don’t change during executing.
COM program in memory:
Complete example from article Snow flakes keep falling on my... screen?
Compilation:
tasm flake
tlink flake
This program is an example of using Turbo C inline assembly statements. For compilation you will need:
tcc -B plot.c
)bcc -B plot.c
)/****************************************************************
* *
C News Vol. 1 Issue 11 Sept 15, 1988
CHOOSING A MEMORY MODEL by Bill Mayne
ABSTRACT: The meaning of the "near", "far", and "huge"
keywords specifying pointer types and how these are related to
the various memory models available to C programmers using the
80x86 family of processors used in IBM and compatible PCs and
This gist is showing an example of C program calling routine written in assembly.
Tiny computer keyboard FM player for those who have kind of AdLib or Sound Blaster. It's just a little piece of code for fun...
NB! The Extended (4-operator) FM Synthesis Mode of SBPro 2 is not controlled. Due to it there may be missounds when the Clavier is executed with SBPro 2 with ExtFM switched on.
/*********************************************************************/
/* */
/* All the following functions were written by Paul Edwards and */
/* placed in the Public Domain except for cursor() which was */
/* written by Gary Chambers and I am waiting for him to tell me */
/* whether his routine can be placed in the Public Domain. Oh */
/* yeah, I modified Gary's routines *slightly*. */