Question: Help me to write a backspace function in C! Hello, Im trying to write a code so that this thing can detect if user press

Help me to write a backspace function in C!

Hello, Im trying to write a code so that this thing can detect if user press backspace on their keyboard. So i want to remove the element and then also remove the letter from the terminal. But somehow, how much I try, the letter is still there and it is so frustrating. Help me please.

Also we cannot use stdio.h and should use serial_print for printing which is confusing me a lot

my problematic result: it does not delete a character even if i press backspace

Help me to write a backspace function in C! Hello, Im trying

code:

#include

#include

#include

#include

#include "polling.h"

int polling (char *buffer, int *count){

int num_typed = 0;

char temp[2];

char letter;

int getSize;

while(1){

if (inb(COM1 + 5) & 1) {

letter = inb(COM1); /ow i got the letter

if(letter!=0x08){ // so if its not backspace(hex val)

buffer[num_typed] = letter;}//store in array

else if (letter ==0x08){ //if it is back space(im not sure if this looks right)

num_typed --;

buffered[num_typed]='

klogv: Starting MPX boot sequence... klogv: Initialized serial I/0 on COM1 device.. klogv: Initializing descriptor tables... klogv: Initializing virtual nenory... klogv: Transferring control to comnhand... helllp

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!