OpenCores
URL https://opencores.org/ocsvn/s80186/s80186/trunk

Subversion Repositories s80186

[/] [s80186/] [trunk/] [rtl/] [microcode/] [flags.us] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 jamieiles
// Copyright Jamie Iles, 2017
2
//
3
// This file is part of s80x86.
4
//
5
// s80x86 is free software: you can redistribute it and/or modify
6
// it under the terms of the GNU General Public License as published by
7
// the Free Software Foundation, either version 3 of the License, or
8
// (at your option) any later version.
9
//
10
// s80x86 is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
// GNU General Public License for more details.
14
//
15
// You should have received a copy of the GNU General Public License
16
// along with s80x86.  If not, see .
17
 
18
// CLC
19
.at 0xf8;
20
    b_sel IMMEDIATE, immediate 0x0, alu_op SETFLAGSB, update_flags CF,
21
        next_instruction;
22
 
23
// STC
24
.at 0xf9;
25
    b_sel IMMEDIATE, immediate 0xffff, alu_op SETFLAGSB, update_flags CF,
26
        next_instruction;
27
 
28
// CLI
29
.at 0xfa;
30
    b_sel IMMEDIATE, immediate 0x0, alu_op SETFLAGSB, update_flags IF,
31
        next_instruction;
32
 
33
// STI
34
.at 0xfb;
35
    b_sel IMMEDIATE, immediate 0xffff, alu_op SETFLAGSB, update_flags IF,
36
        ext_int_inhibit, next_instruction;
37
 
38
// CLD
39
.at 0xfc;
40
    b_sel IMMEDIATE, immediate 0x0, alu_op SETFLAGSB, update_flags DF,
41
        next_instruction;
42
 
43
// STD
44
.at 0xfd;
45
    b_sel IMMEDIATE, immediate 0xffff, alu_op SETFLAGSB, update_flags DF,
46
        next_instruction;
47
 
48
// CMC
49
.at 0xf5;
50
    alu_op CMC, update_flags CF, next_instruction;
51
 
52
// LAHF
53
.at 0x9f;
54
    alu_op GETFLAGS, rd_sel_source MICROCODE_RD_SEL, rd_sel AH,
55
        width W8, next_instruction;
56
 
57
// SAHF
58
.at 0x9e;
59
    ra_sel AH, width W8, jmp sahf;
60
.auto_address;
61
sahf:
62
    a_sel RA, alu_op SETFLAGSA, update_flags CF PF AF ZF SF, next_instruction;
63
 
64
// SETALC
65
.at 0xd6;
66
    ra_sel CX, rb_cl, jmp setalc;
67
.auto_address;
68
setalc:
69
    width W8, a_sel RA, b_sel RB, alu_op SBB,
70
        rd_sel_source MICROCODE_RD_SEL, rd_sel AL, next_instruction;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.