M
M
Mikle2016-04-28 13:47:37
Programming
Mikle, 2016-04-28 13:47:37

How is a binary number entered into the console in TASM Assembler?

I need to enter a two-byte code in binary form into the console, I did not find input examples. Tell me please

Answer the question

In order to leave comments, you need to log in

3 answer(s)
J
jcmvbkbc, 2016-04-28
@jcmvbkbc

Read a line from standard input with the function 3fh , put 0 into the result, and then, going along the read line from left to right, shift the result to the left by 1 bit, and put 0 or 1 in the least significant bit, depending on the current character in the line.

V
VaneS Ri_Lax, 2015-05-19
@vanesxl

Implemented like this:
In the htaccess file I registered

<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{REQUEST_URI} /+[^\.]+$
RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]
  
# RewriteCond %{HTTP_HOST} !^www.
# RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [R=301,L]
  RewriteRule ^(.*)sitemap.xml$ index.php?rewrite=sitemap.xml [QSA]
  RewriteRule ^(.*)/$ index.php?rewrite=$1 [QSA,L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule ^(.*)$ index.php?rewrite=$1 [QSA,L]
# RewriteRule ^index.php\/(.*)$ index.php?rewrite=index.php/$1 [QSA]
# If-Modified-Since (if php is not installed as cgi then comment lines below)
  RewriteRule .* - [E=HTTP_IF_MODIFIED_SINCE:%{HTTP:If-Modified-Since}]
  RewriteRule .* - [E=HTTP_IF_NONE_MATCH:%{HTTP:If-None-Match}]
</IfModule>

As a result, it turns out if you write in php:
<?php 
echo $_SERVER['QUERY_STRING'];
?>

the result will be the line:
rewrite=news&page=1 

M
myfirepukan, 2015-05-19
@myfirepukan

Read about routing. You can also use htaccess to stir it up, but it's not so convenient.
UP
If without frameworks and classes, then something like this:

$url = trim($_SERVER['REQUEST_URI']);
$pieces = explode("/", $url);
...
if(preg_match('/\/news\//is',$url,$matches_art) ){
if ($matches_art) {
                            include 'system/news.php';
                            $is404 = 0;
                            }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question